作者 刘晓艳

科学小队长逻辑连接

... ... @@ -5,68 +5,94 @@ Page({
* 页面的初始数据
*/
data: {
punchState: true,
address: ''
},
//打卡申诉
punchApply(){
punchApply() {
wx.navigateTo({
url: 'punchAppeal/punchAppeal',
})
},
//打卡
punch() {
var that = this
wx.getLocation({
type: 'wgs84',
success: function(res) {
console.log(res)
var latitude = res.latitude
var longitude = res.longitude
var speed = res.speed
var accuracy = res.accuracy
},
})
wx.chooseLocation({
success: function(res) {
console.log(res)
var latitude = res.latitude
var longitude = res.longitude
var address = res.address
that.setData({
address: address,
punchState:false
})
},
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -3,11 +3,12 @@
<view class='circle_large'>
<view class='circle_middle'>
<view class='circle_small'>
<text wx:if='{{}}'>一键打卡</text>
<text class='iconfont icon-dui'></text>
<text wx:if='{{punchState}}' bindtap='punch'>一键打卡</text>
<text class='iconfont icon-dui' wx:else></text>
</view>
</view>
</view>
<view class='punch_info'>当前:未获取</view>
<view class='punch_info' wx:if="{{address==''}}">当前:未获取</view>
<view class='punch_info' wx:else>当前:{{address}}</view>
<view class='punch_btn' bindtap='punchApply'>打卡申诉</view>
</view>
\ No newline at end of file
... ...
... ... @@ -42,9 +42,11 @@
font-size: 90rpx;
}
.punch_info{
width: 600rpx;
font-size: 32rpx;
color: #FFFFFF;
margin-top: 60rpx;
text-align: center;
}
.punch_btn {
width: 200rpx;
... ...
... ... @@ -54,10 +54,10 @@ Page({
},
})
},
//跳转申诉详情页
listDetail(){
//跳转申诉详情页
listDetail() {
wx.navigateTo({
url:'../punchAppealDetail/punchAppealDetail',
url: '../punchAppealDetail/punchAppealDetail',
})
},
/**
... ...
... ... @@ -13,6 +13,20 @@ Page({
url: '../punchAppealDetail2/punchAppealDetail2',
})
},
//上传图片
uploadImg() {
wx.chooseImage({
success: function (res) {
console.log(res)
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: '',
filePath: 'tempFilePaths[0]',
name: 'file',
})
},
})
},
/**
* 生命周期函数--监听页面加载
*/
... ...
... ... @@ -7,60 +7,74 @@ Page({
data: {
},
//上传图片
uploadImg() {
wx.chooseImage({
success: function(res) {
console.log(res)
const tempFilePaths = res.tempFilePaths
wx.uploadFile({
url: '',
filePath: 'tempFilePaths[0]',
name: 'file',
})
},
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -6,16 +6,25 @@ Page({
*/
data: {
is_agree: true,
is_the_week: true,
},
clickAgreeBtn() {
this.setData({is_agree: !this.data.is_agree});
console.log(this.data.is_agree);
},
//去预约
goAppointment(){
wx.navigateTo({
url: '/pages/index/go-appointment/go-appointment',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
is_the_week: JSON.parse(options.is_the_week)
})
},
/**
... ...
... ... @@ -14,13 +14,13 @@
</view>
<view class="jiexi">解析长图</view>
<view class="footer">
<view class="footer" wx:if="{{is_the_week}}">
<view class="service" bindtap="clickAgreeBtn">
<view class="agree_box">
<view class="agree_btn" wx:if="{{is_agree}}"></view>
</view>
<text>服务协议</text>
</view>
<view class="order_btn">去预约</view>
</view>
<view class="order_btn" bindtap='goAppointment'>去预约</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -5,131 +5,135 @@ const months = []
const days = []
for (let i = 1990; i <= date.getFullYear(); i++) {
years.push(i)
years.push(i)
}
for (let i = 1 ; i <= 12; i++) {
months.push(i)
for (let i = 1; i <= 12; i++) {
months.push(i)
}
for (let i = 1 ; i <= 31; i++) {
days.push(i)
for (let i = 1; i <= 31; i++) {
days.push(i)
}
Page({
/**
* 页面的初始数据
*/
data: {
name: '',
sex: ['男','女'],
city: ['北京市','天津市','河北省'],
years: years,
year: date.getFullYear(),
months: months,
month: 2,
days: days,
day: 2,
value: [9999, 1, 1],
},
inputName(e) {
this.setData({name: e.detail.value});
},
//选择性别
sexPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
sex_index: e.detail.value,
is_sex_change: true,
})
},
//选择生日
birthPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
birth_date: e.detail.value,
is_birth_change: true,
})
// const val = e.detail.value;
// this.setData({
// year: this.data.years[val[0]],
// month: this.data.months[val[1]],
// day: this.data.days[val[2]]
// })
},
//选择城市
cityPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
city_index: e.detail.value,
is_city_change: true,
})
},
//保存
clickSave() {
if(this.data.name === '') {
wx.showToast({
title: '请填写学员姓名',
icon: 'none'
})
}else {
wx.navigateBack({delta: 1})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
/**
* 页面的初始数据
*/
data: {
name: '',
sex: ['男', '女'],
city: ['北京市', '天津市', '河北省'],
years: years,
year: date.getFullYear(),
months: months,
month: 2,
days: days,
day: 2,
value: [9999, 1, 1],
},
inputName(e) {
this.setData({
name: e.detail.value
});
},
//选择性别
sexPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
sex_index: e.detail.value,
is_sex_change: true,
})
},
//选择生日
birthPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
birth_date: e.detail.value,
is_birth_change: true,
})
// const val = e.detail.value;
// this.setData({
// year: this.data.years[val[0]],
// month: this.data.months[val[1]],
// day: this.data.days[val[2]]
// })
},
//选择城市
cityPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
city_index: e.detail.value,
is_city_change: true,
})
},
//保存
clickSave() {
if (this.data.name === '') {
wx.showToast({
title: '请填写学员姓名',
icon: 'none'
})
} else {
wx.navigateTo({
url: '../../../my/myProfile/myProfile',
})
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
// pages/index/confirm-appointment-info/confirm-appointment-info.js
Page({
/**
* 页面的初始数据
*/
data: {
show: false,
/**
* 页面的初始数据
*/
data: {
show: false,
is_showModal: false,
is_showSuccessModal: false,
pay_success: false,
children: [{
name: '张三',
is_choose: true
},
{
name: '李思思',
is_choose: false
},
{
name: '迪丽热巴-迪力木拉提',
is_choose: false
}
],
is_choose: false,
},
chooseChildren(e) {
const current = e.currentTarget.dataset.index;
this.setData({
currentChild: current,
[`children[${current}].is_choose`]: !this.data.children[current].is_choose
})
},
refreshModal() {
this.setData({
pay_success: true
});
},
submit() {
if(this.data.pay_success) {
this.setData({
is_showModal: false,
is_showSuccessModal: false,
children: [{name:'张三',is_choose: true},
{name:'李思思', is_choose: false},
{name:'迪丽热巴-迪力木拉提',is_choose: false}],
is_choose: false,
},
chooseChildren(e) {
const current = e.currentTarget.dataset.index;
this.setData({
currentChild: current,
[`children[${current}].is_choose`]: !this.data.children[current].is_choose
})
},
submit() {
this.setData({is_showModal: true})
},
chooseNo(e) {
this.setData({currentBtn: e.currentTarget.dataset.index,is_showModal: false})
wx.switchTab({url: '/pages/index/index'})
},
chooseYes(e) {
this.setData({
currentBtn: e.currentTarget.dataset.index,
is_showModal: false,
is_showSuccessModal: true
})
},
modalConfirm() {
this.setData({is_showSuccessModal: false})
},
disableScroll() {},
addStudent() {
wx.navigateTo({url: './add-student/add-student'})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
const self = this;
setTimeout(function () {
self.setData({show: true})
},500)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
is_showSuccessModal: true,
});
}else {
this.setData({
is_showModal: true
});
}
},
chooseNo(e) {
this.setData({
currentBtn: e.currentTarget.dataset.index,
is_showModal: false
})
wx.navigateBack({
delta: 1
})
},
//弹窗确认事件
chooseYes(e) {
this.setData({
currentBtn: e.currentTarget.dataset.index,
is_showModal: false,
// is_showSuccessModal: true
})
wx.navigateTo({
url: '../../my/buyCard/buyCard',
})
},
modalConfirm() {
this.setData({
is_showSuccessModal: false
})
wx.redirectTo({
url: '../../my/all-appointment/all-appointment?currentTab=' + 2,
})
},
disableScroll() {},
addStudent() {
wx.navigateTo({
url: './add-student/add-student'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
const self = this;
setTimeout(function() {
self.setData({
show: true
})
}, 500)
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
<!--pages/index/confirm-appointment-info/confirm-appointment-info.wxml-->
<view class="content">
<view class="tips {{show?'active':''}}">
<!--<view>-->
<view class="iconfont icon-jinggao"></view>
<text>请在15分钟内确认预约,超时系统将自动取消!</text>
<!--</view>-->
</view>
<view class="time">
<view class="line"></view>
<text>预约时间 : </text>
<text class="date-time">2018年10月10号 10:00-11:30</text>
</view>
<view class="tips {{show?'active':''}}">
<!--<view>-->
<view class="iconfont icon-jinggao"></view>
<text>请在15分钟内确认预约,超时系统将自动取消!</text>
<!--</view>-->
</view>
<view class="time">
<view class="line"></view>
<text>预约时间 : </text>
<text class="date-time">2018年10月10号 10:00-11:30</text>
</view>
<view class="address">
<view class="time">
<view class="line"></view>
<text>预约地址 :</text>
</view>
<view class="address-detail">
<!--<text>-->
朝阳区万寿路5号楼马兰大厦B座301念读书馆内朝阳区读书馆内朝阳区万寿路5号楼马兰大厦B座301念读书万寿路5号楼马兰大厦B座301念读书
<!--</text>-->
</view>
<view class="address">
<view class="time">
<view class="line"></view>
<text>预约地址 :</text>
</view>
<view class="phone-num">
<view class="line"></view>
<text>预约电话 :</text>
<text class="phone">188****8888</text>
<view class="address-detail">
<!--<text>-->
朝阳区万寿路5号楼马兰大厦B座301念读书馆内朝阳区读书馆内朝阳区万寿路5号楼马兰大厦B座301念读书万寿路5号楼马兰大厦B座301念读书
<!--</text>-->
</view>
<view class="children-name">
<view class="left-name">
<view class="line"></view>
<text>学员姓名</text>
</view>
<image src="../../../images/add_btn.png" bindtap="addStudent"></image>
</view>
<view class="phone-num">
<view class="line"></view>
<text>预约电话 :</text>
<text class="phone">188****8888</text>
</view>
<view class="children-name">
<view class="left-name">
<view class="line"></view>
<text>学员姓名</text>
</view>
<view class="name-box">
<view class="check-box" wx:for="{{children}}" wx:key="index" bindtap="chooseChildren"
data-index="{{index}}">
<view class="name {{item.is_choose?'change-color':''}}">{{item.name}}</view>
<image src="../../../images/choose_icon.png" wx:if="{{item.is_choose}}" class="check-icon"></image>
</view>
<image src="../../../images/add_btn.png" bindtap="addStudent"></image>
</view>
<view class="name-box">
<view class="check-box" wx:for="{{children}}" wx:key="index" bindtap="chooseChildren" data-index="{{index}}">
<view class="name {{item.is_choose?'change-color':''}}">{{item.name}}</view>
<image src="../../../images/choose_icon.png" wx:if="{{item.is_choose}}" class="check-icon"></image>
</view>
</view>
<view class="footer">
<view class="confirm_btn" bindtap="submit">
<text>确认预约</text>
</view>
<view class="footer">
<view class="confirm_btn" bindtap="submit">
<text>确认预约</text>
</view>
<!--是否购买畅玩卡弹窗-->
<view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll">
<view class="background"
bindtap="handleBackground"
wx:if="{{is_showModal}}"
catchtouchmove="disableScroll">
</view>
<view class="modalBackground Augly-bouncein">
<view class="modal">
<view class="tips-word">当前学员还没有购买/兑换畅玩卡,暂不能预约实验活动,是否马上购买/兑换?</view>
<view class="yes-no-btn">
<text bindtap="chooseNo" class="{{currentBtn == 0?'change-color':''}}" data-index="{{0}}">否</text>
<text bindtap="chooseYes" class="{{currentBtn == 1?'change-color':''}}" data-index="{{1}}">是</text>
</view>
</view>
</view>
</view>
<!--是否购买畅玩卡弹窗-->
<view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll">
<view class="background" bindtap="handleBackground" wx:if="{{is_showModal}}" catchtouchmove="disableScroll">
</view>
<!--预约成功弹窗-->
<view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll">
<view class="background"
bindtap="handleBackground"
wx:if="{{is_showSuccessModal}}"
catchtouchmove="disableScroll">
</view>
<view class="modalBackground Augly-bouncein">
<view class="success-modal">
<image src="../../../images/success.jpg"></image>
<view class="congratulations">恭喜您</view>
<view class="appointment-success">您已经预约成功!</view>
<view class="confirm-btn" bindtap="modalConfirm">确定</view>
</view>
<view class="modalBackground Augly-bouncein">
<view class="modal">
<view class="tips-word">当前学员还没有购买/兑换畅玩卡,暂不能预约实验活动,是否马上购买/兑换?</view>
<view class="yes-no-btn">
<text bindtap="chooseNo" class="{{currentBtn == 0?'change-color':''}}" data-index="{{0}}">否</text>
<text bindtap="chooseYes" class="{{currentBtn == 1?'change-color':''}}" data-index="{{1}}">是</text>
</view>
</view>
</view>
</view>
<!--预约成功弹窗-->
<view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll">
<view class="background" bindtap="handleBackground" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll">
</view>
<view class="modalBackground Augly-bouncein">
<view class="success-modal">
<image src="../../../images/success.jpg"></image>
<view class="congratulations">恭喜您</view>
<view class="appointment-success">您已经预约成功!</view>
<view class="confirm-btn" bindtap="modalConfirm">确定</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -5,122 +5,209 @@ Page({
* 页面的初始数据
*/
data: {
array: ['北京市', '天津市', '上海市', '河北省'],
currentCity: '北京市',
is_change: false,
show_submit_btn: false,
areaTest: [
{area: '朝阳区', list: [{id: 1,name: '798实验室'},{id: 2,name:'木鱼湖实验室'},{id: 3,name:'南锣鼓巷实验室'}]},
{area: '东城区', list: [{id: 4,name: '798实验室'},{id: 5,name:'木鱼湖实验室'},{id: 6,name:'南锣鼓巷实验室'}]},
{area: '西城区', list: [{id: 7,name: '798实验室'},{id: 11,name:'木鱼湖实验室'},{id: 8,name:'南锣鼓巷实验室'}]},
{area: '昌平区', list: [{id: 9,name: '798实验室'},{id: 12,name:'木鱼湖实验室'},{id: 10,name:'南锣鼓巷实验室'}]},
],
test: {title: '798实验室,本实验室分为三个阶段,第一阶段由家长和孩子共同完成,第二阶段由孩子独立完成。家长在旁边指导,第三阶段巴拉巴拉',
list:[{week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6},
{week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 0},
{week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
{week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 0},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6}
]},
},
//选择城市
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value,
is_change: true,
})
},
//选择实验室
chooseTest(e) {
console.log(e.currentTarget.dataset.index);
const current = e.currentTarget.dataset.index;
const current_id = e.currentTarget.dataset.id;
this.setData({currentTest: current,currentId: current_id})
},
//选择时段
chooseTime(e) {
console.log(e.currentTarget.dataset.index);
const current = e.currentTarget.dataset.index;
this.setData({currentTime: current})
},
//点击单人预约
singleAppointment() {
this.setData({show_submit_btn: true})
},
//点击双人预约
doubleAppointment() {
this.setData({show_submit_btn: true})
},
submit() {
wx.navigateTo({url: '/pages/index/confirm-appointment-info/confirm-appointment-info'})
array: ['北京市', '天津市', '上海市', '河北省'],
currentCity: '北京市',
is_change: false,
show_submit_btn: false,
areaTest: [{
area: '朝阳区',
list: [{
id: 1,
name: '798实验室'
}, {
id: 2,
name: '木鱼湖实验室'
}, {
id: 3,
name: '南锣鼓巷实验室'
}]
},
{
area: '东城区',
list: [{
id: 4,
name: '798实验室'
}, {
id: 5,
name: '木鱼湖实验室'
}, {
id: 6,
name: '南锣鼓巷实验室'
}]
},
{
area: '西城区',
list: [{
id: 7,
name: '798实验室'
}, {
id: 11,
name: '木鱼湖实验室'
}, {
id: 8,
name: '南锣鼓巷实验室'
}]
},
{
area: '昌平区',
list: [{
id: 9,
name: '798实验室'
}, {
id: 12,
name: '木鱼湖实验室'
}, {
id: 10,
name: '南锣鼓巷实验室'
}]
},
],
test: {
title: '798实验室,本实验室分为三个阶段,第一阶段由家长和孩子共同完成,第二阶段由孩子独立完成。家长在旁边指导,第三阶段巴拉巴拉',
list: [{
week: '周六',
date: '10月20日',
time: '10:00 — 11:30',
rest: 6
},
{
week: '周日',
date: '10月21日',
time: '15:00 — 16:30',
rest: 0
},
{
week: '周日',
date: '10月21日',
time: '15:00 — 16:30',
rest: 6
},
{
week: '周日',
date: '10月21日',
time: '15:00 — 16:30',
rest: 0
},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周日',date: '10月21日',time:'15:00 — 16:30',rest: 6},
// {week:'周六',date: '10月20日',time:'10:00 — 11:30',rest: 6}
]
},
},
//选择城市
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.setData({
index: e.detail.value,
is_change: true,
})
},
//选择实验室
chooseTest(e) {
console.log(e.currentTarget.dataset.index);
const current = e.currentTarget.dataset.index;
const current_id = e.currentTarget.dataset.id;
this.setData({
currentTest: current,
currentId: current_id
})
},
//选择时段
chooseTime(e) {
console.log(e.currentTarget.dataset.index);
const current = e.currentTarget.dataset.index;
this.setData({
currentTime: current
})
},
//点击单人预约
singleAppointment() {
this.setData({
show_submit_btn: true
})
},
//点击双人预约
doubleAppointment() {
this.setData({
show_submit_btn: true
})
},
submit() {
wx.navigateTo({
url: '/pages/index/confirm-appointment-info/confirm-appointment-info'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.data.areaTest.forEach((v,i)=>{
Object.keys(v).forEach(v=>{
console.log(v)//取到了key
console.log(this.data.areaTest[i][v])//取到了值
})
onLoad: function(options) {
this.data.areaTest.forEach((v, i) => {
Object.keys(v).forEach(v => {
console.log(v) //取到了key
console.log(this.data.areaTest[i][v]) //取到了值
})
// console.log(this.data.areaTest);
})
// console.log(this.data.areaTest);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -4,66 +4,107 @@ const app = getApp()
Page({
data: {
hasPhone: true,
imgUrls:[
{'url': '../../images/banner.jpg'},
{'url': '../../images/banner.jpg'},
{'url': '../../images/banner.jpg'},],
autoplay: true, //是否自动轮播
interval: 2000, //间隔时间
duration: 500, //滑动时间
this_week_test_info: {
info: [
{time: '11月01号-11月07号',url: '../../images/test_img.jpg',},
{time: '11月08号-11月14号',url: '../../images/test_img.jpg'},
],
is_this_week: true,
ordered: false,
is_past: false,
hasPhone: true,
imgUrls: [{
'url': '../../images/banner.jpg'
},
past_test_info: {
info: [
{time: '10月01号-10月07号',url: '../../images/test_img.jpg',},
{time: '10月08号-10月14号',url: '../../images/test_img.jpg'},
{time: '10月15号-10月21号',url: '../../images/test_img.jpg'},
],
is_this_week: false,
ordered: false,
is_past: true,
{
'url': '../../images/banner.jpg'
},
{
'url': '../../images/banner.jpg'
},
],
autoplay: true, //是否自动轮播
interval: 2000, //间隔时间
duration: 500, //滑动时间
info: [{
time: '11月01号-11月07号',
url: '../../images/test_img.jpg',
},
{
time: '11月08号-11月14号',
url: '../../images/test_img.jpg'
},
],
this_week_test_info: {
info: [{
time: '11月01号-11月07号',
url: '../../images/test_img.jpg',
},
{
time: '11月08号-11月14号',
url: '../../images/test_img.jpg'
},
],
is_this_week: true,
ordered: false,
is_past: false,
},
past_test_info: {
info: [{
time: '10月01号-10月07号',
url: '../../images/test_img.jpg',
},
{
time: '10月08号-10月14号',
url: '../../images/test_img.jpg'
},
{
time: '10月15号-10月21号',
url: '../../images/test_img.jpg'
},
],
is_this_week: false,
ordered: false,
is_past: true,
},
},
swiperChange: function (e) { //切换轮播图
this.setData({
currentSwiper: e.detail.current
})
swiperChange: function(e) { //切换轮播图
this.setData({
currentSwiper: e.detail.current
})
},
//首次登录小程序,跳转到认证手机页面
goPhoneCode() {
wx.navigateTo({url: '/pages/index/phone-code/phone-code'})
wx.redirectTo({
url: '/pages/index/phone-code/phone-code'
})
},
//点击购买畅玩卡
goBuyCard() {
wx.navigateTo({url: './activity-detail/activity-detail'})
wx.navigateTo({
url: '../my/myCard/myCard'
})
},
//点击进入活动详情
goTestDetail(e) {
// console.log(e);
const current = e.currentTarget.dataset.index;
wx.navigateTo({url: './activity-detail/activity-detail'})
console.log(e)
const current = e.currentTarget.dataset.index;
var is_the_week = e.currentTarget.dataset.is_the_week
wx.navigateTo({
url: './activity-detail/activity-detail?is_the_week=' + is_the_week
})
},
//前往预约
goAppointment (e) {
const current = e.currentTarget.dataset.index;
wx.navigateTo({url: './go-appointment/go-appointment'})
goAppointment(e) {
const current = e.currentTarget.dataset.index;
wx.navigateTo({
url: './go-appointment/go-appointment'
})
},
onLoad: function () {
onLoad: function() {
if (this.data.hasPhone == false) {
wx.hideTabBar({
})
}
if (app.globalData.userInfo) {
this.setData({
userInfo: app.globalData.userInfo,
hasUserInfo: true
})
} else if (this.data.canIUse){
// 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况
} else if (this.data.canIUse) {
app.userInfoReadyCallback = res => {
this.setData({
userInfo: res.userInfo,
... ... @@ -91,4 +132,4 @@ Page({
hasUserInfo: true
})
}
})
})
\ No newline at end of file
... ...
<!--index.wxml-->
<view class="container">
<!--蒙层-->
<view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view>
<view class="modal" wx:if="{{!hasPhone}}" bindtap="goPhoneCode"></view>
<!--轮播图-->
<!--轮播图-->
<view class="wrap">
<swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true"
bindchange="swiperChange">
<swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true" bindchange="swiperChange">
<block wx:for="{{imgUrls}}" wx:key="index">
<swiper-item>
<navigator url="{{item.url}}" hover-class="navigator-hover">
<view class="index_top">
<image src="{{item.url}}" class="slide-image" mode="aspectFill"/>
<image src="{{item.url}}" class="slide-image" mode="aspectFill" />
</view>
</navigator>
</swiper-item>
... ... @@ -24,17 +23,54 @@
</view>
</view>
<!--购买-->
<!--购买-->
<view class="btn-box" bindtap="goBuyCard">
<view class="buy-btn">
<text>点击图片可跳转到购买页</text>
</view>
</view>
<!--实验列表-->
<import src="/templates/templates.wxml" />
<view class="past_template">
<template is="experiment" data="{{...this_week_test_info}}"></template>
<template is="experiment" data="{{...past_test_info}}"></template>
<!--实验列表-->
<!-- <import src="/templates/templates.wxml" /> -->
<view class="past_template">
<!-- <template is="experiment" data="{{...this_week_test_info}}"></template>
<template is="experiment" data="{{...past_test_info}}"></template> -->
<view class='experiment_box'>
<view class="title_box">
<view class="line"></view>
<text>本周实验</text>
<!-- <text>往期实验</text> -->
</view>
<view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{true}}'>
<view class="test_box">
<view class="time">{{item.time}}</view>
<view class="img_box">
<image src="{{item.url}}"></image>
</view>
</view>
<view class="order_box">
<text catchtap="goAppointment" data-index="{{index}}">前往预约</text>
</view>
</view>
</view>
</view>
<view class='experiment_box'>
<view class="title_box" bindtap="goTestDetail" data-is_the_week='{{false}}'>
<view class="line"></view>
<text>往期实验</text>
</view>
<view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail" data-is_the_week='{{false}}'>
<view class="test_box">
<view class="time">{{item.time}}</view>
<view class="img_box">
<image src="{{item.url}}"></image>
</view>
</view>
<view class="order_box">
<text>查看</text>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -14,7 +14,7 @@ page {
left: 0;
top: 0;
background-color: #000000;
opacity: 0;
opacity: 0.8;
z-index: 10;
}
... ...
... ... @@ -6,88 +6,94 @@ Page({
* 页面的初始数据
*/
data: {
fun_id: 2,
time: '获取验证码', //倒计时
currentTime: 61
fun_id: 2,
time: '获取验证码', //倒计时
currentTime: 61
},
getCode: function (options) {
var that = this;
var currentTime = that.data.currentTime;
interval = setInterval(function () {
currentTime--;
that.setData({
time: currentTime + '秒'
})
if (currentTime <= 0) {
clearInterval(interval);
that.setData({
time: '重新发送',
currentTime: 61,
disabled: false
})
}
}, 1000)
},
getVerificationCode() {
this.getCode();
var that = this;
getCode: function(options) {
var that = this;
var currentTime = that.data.currentTime;
interval = setInterval(function() {
currentTime--;
that.setData({
disabled: true
time: currentTime + '秒'
})
if (currentTime <= 0) {
clearInterval(interval);
that.setData({
time: '重新发送',
currentTime: 61,
disabled: false
})
}
}, 1000)
},
getVerificationCode() {
this.getCode();
var that = this;
that.setData({
disabled: true
})
},
//确认
confirm() {
wx.switchTab({
url: '../../index/index'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@
</view>
<view class="confirm_box">
<view class="confirm_btn">
<view class="confirm_btn" bindtap='confirm'>
<text>确 定</text>
</view>
</view>
... ...
... ... @@ -19,7 +19,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({currentTab: +options.currentTab})
},
/**
... ... @@ -33,7 +33,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log('show',this.data.currentTab)
},
/**
... ...
<!--pages/my/all-appointment/all-appointment.wxml-->
<view class="content">
<!--tab-->
<view class="tab-box">
<view wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}"
class="{{currentTab == index?'change-color':''}}">{{item}}</view>
</view>
<!--预约列表-->
<view class="list-box">
<view class="order-box">
<view class="head">
<text class="number">预约单号:000120180208</text>
<text class="appointment-state" wx:if="{{currentTab === 1}}" style="color: #FC5B63;">待确认</text>
<text class="appointment-state" wx:if="{{currentTab === 2}}">已预约</text>
<text class="appointment-state" wx:if="{{currentTab === 3}}" style="color: #464646;">已取消</text>
<text class="appointment-state" wx:if="{{currentTab === 4}}" style="color: #C3C3C3;">已结束</text>
</view>
<view class="section">
<image src="../../../images/red_line.png" wx:if="{{currentTab === 1}}" class="blue-line"></image>
<image src="../../../images/blue_line.png" wx:if="{{currentTab === 2}}" class="blue-line"></image>
<image src="../../../images/deep_grey_line.png" wx:if="{{currentTab === 3}}" class="blue-line"></image>
<image src="../../../images/grey_line.png" wx:if="{{currentTab === 4}}" class="blue-line"></image>
<view class="right-box">
<view class="right-top-box">
<view class="iconfont icon-dingwei"></view>
<view class="address">北京市朝阳区万寿路马兰大厦B座北京市朝阳区万寿路马兰大厦B座</view>
</view>
<view class="right-bottom-box">
<view class="iconfont icon-shangwutubiao"></view>
<view class="date-box">
<view class="date">预约日期:2018.09.02 10:00-11:30</view>
<view class="not_confirm" wx:if="{{currentTab === 1}}">
<view class="go-cancel">取消</view>
<view class="go-confirm">去确认</view>
</view>
<view class="cancel" wx:if="{{currentTab === 2}}">取消</view>
<view class="iconfont icon-quxiao" wx:if="{{currentTab === 3}}"></view>
<view class="iconfont icon-jieshu" wx:if="{{currentTab === 4}}"></view>
</view>
</view>
</view>
<!--tab-->
<view class="tab-box">
<view wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}" class="{{currentTab == index?'change-color':''}}">{{item}}</view>
</view>
<!--预约列表-->
<view class="list-box">
<view class="order-box">
<view class="head">
<text class="number">预约单号:000120180208</text>
<text class="appointment-state" wx:if="{{currentTab === 1}}" style="color: #FC5B63;">待确认</text>
<text class="appointment-state" wx:if="{{currentTab === 2}}">已预约</text>
<text class="appointment-state" wx:if="{{currentTab === 3}}" style="color: #464646;">已取消</text>
<text class="appointment-state" wx:if="{{currentTab === 4}}" style="color: #C3C3C3;">已结束</text>
</view>
<view class="section">
<image src="../../../images/red_line.png" wx:if="{{currentTab === 1}}" class="blue-line"></image>
<image src="../../../images/blue_line.png" wx:if="{{currentTab === 2}}" class="blue-line"></image>
<image src="../../../images/deep_grey_line.png" wx:if="{{currentTab === 3}}" class="blue-line"></image>
<image src="../../../images/grey_line.png" wx:if="{{currentTab === 4}}" class="blue-line"></image>
<view class="right-box">
<view class="right-top-box">
<view class="iconfont icon-dingwei"></view>
<view class="address">北京市朝阳区万寿路马兰大厦B座北京市朝阳区万寿路马兰大厦B座</view>
</view>
<view class="right-bottom-box">
<view class="iconfont icon-shangwutubiao"></view>
<view class="date-box">
<view class="date">预约日期:2018.09.02 10:00-11:30</view>
<view class="not_confirm" wx:if="{{currentTab === 1}}">
<view class="go-cancel">取消</view>
<view class="go-confirm">去确认</view>
</view>
<view class="cancel" wx:if="{{currentTab === 2}}">取消</view>
<view class="iconfont icon-quxiao" wx:if="{{currentTab === 3}}"></view>
<view class="iconfont icon-jieshu" wx:if="{{currentTab === 4}}"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -15,11 +15,11 @@ page {
-moz-box-sizing: border-box;
box-sizing: border-box;
background-color: #fff;
/*border-bottom: 4rpx solid #3FA9F5;*/
/* border-bottom: 1rpx solid #ebebeb; */
}
.tab-box view {
line-height: 80rpx;
/*position: relative;*/
position: relative;
}
.change-color {
color: #3FA9F5;
... ...
... ... @@ -7,67 +7,97 @@ Page({
data: {
userlist: ['张三', '里斯'],
index: -1,
pay_success: false,
},
//选择成员
userList(e) {
this.setData({
index: e.detail.value
})
},
//添加学员
addUser() {
wx.navigateTo({
url: '../../index/confirm-appointment-info/add-student/add-student',
})
},
//服务协议
serviceProtocol() {
wx.navigateTo({
url: '../protocol/protocol',
})
},
//确认支付
confirmPay() {
this.setData({pay_success: true});
this.changeState();
wx.navigateBack({
delta: 1
})
},
//更新上一页面的购买状态
changeState() {
var pages = getCurrentPages();
if(pages.length > 1) {
var beforePage = pages[pages.length - 2]//获取上一页面实例
if(this.data.pay_success) {
beforePage.refreshModal()
}
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -14,7 +14,7 @@
</picker>
<view class='iconfont icon-daosanjiao'></view>
</view>
<view class='add_box'>
<view class='add_box' bindtap='addUser'>
<text class='iconfont icon-jia'></text>
<text>添加学员</text>
</view>
... ... @@ -22,10 +22,10 @@
<view class='service_info_box'>
<text class='iconfont icon-xuanzhong'></text>
<text>我已阅读并同意畅玩卡</text>
<text class='service_info'>服务协议</text>
<text class='service_info' bindtap='serviceProtocol'>服务协议</text>
</view>
<view class='service_btn_box'>
<view>需支付:¥288.00</view>
<view class='pay_btn'>确定</view>
<view class='pay_btn' bindtap='confirmPay'>确定</view>
</view>
</view>
\ No newline at end of file
... ...
/* pages/buyCard/buyCard.wxss */
@import '../groupBuy/groupBuy.wxss';
@import '../charge/charge.wxss';
.long_img{
width: 100%;
min-height: 1500rpx;
}
.add_person_box {
display: flex;
align-items: center;
... ...
{}
\ No newline at end of file
{
"navigationBarTitleText": "畅玩卡介绍"
}
\ No newline at end of file
... ...
... ... @@ -2,14 +2,14 @@
.content_box {
width: 100%;
height: 100%;
min-height: 2000rpx;
background: #e0e0e0;
font-size: 32rpx;
color: #000;
padding: 30rpx;
position: fixed;
/* position: fixed;
top: 0;
left: 0;
left: 0; */
text-align: center;
/* display: flex;
align-items: center;
... ...
... ... @@ -49,7 +49,9 @@ page {
}
.icon-jia {
display: inline-block;
display: flex;
align-items: center;
justify-content: center;
width: 34rpx;
height: 34rpx;
background: #3fa9f5;
... ...
... ... @@ -2,7 +2,7 @@
<view class='content_box'>
<view class='banner_box'>
<view class='head_img'>
<image src='../../images/head.png'></image>
<image src='../../../images/head.png'></image>
</view>
<view>微信昵称</view>
</view>
... ...
... ... @@ -19,7 +19,8 @@ Page({
})
}
},
//服务协议
serviceProtocol(){},
/**
* 生命周期函数--监听页面加载
*/
... ...
... ... @@ -20,7 +20,7 @@
<view class='list_info_box'>
<view class='info_item'>
<view class='info_box'>
<image src='../../../images/start-logo.png'></image>
<image src='../../../images/logo.png'></image>
<view class='info_label'>发起人</view>
</view>
<view class='info_time'>
... ... @@ -30,7 +30,7 @@
</view>
<view class='info_item'>
<view class='info_box'>
<image src='../../../images/start-logo.png'></image>
<image src='../../../images/logo.png'></image>
<view class='info_label'>发起人</view>
</view>
<view class='info_time'>
... ... @@ -62,7 +62,7 @@
<view class='user_info_box'>
<view class='user_info'>
<view class='info_box'>
<image src='../../../images/start-logo.png'></image>
<image src='../../../images/logo.png'></image>
<view class='info_label'>发起人</view>
</view>
<view>发起人姓名</view>
... ... @@ -120,7 +120,7 @@
<view class='service_info_box'>
<text class='iconfont icon-xuanzhong'></text>
<text>我已阅读并同意畅玩卡</text>
<text class='service_info'>服务协议</text>
<text class='service_info' bindtap='serviceProtocol'>服务协议</text>
</view>
<view class='service_btn_box'>
<view>单价:¥188.00</view>
... ...
... ... @@ -227,6 +227,7 @@ page {
}
.state_box {
padding-top:35rpx;
text-align: right;
}
... ...
// pages/my/my.js
Page({
/**
* 页面的初始数据
*/
data: {
},
//跳转我的预约
myAppointment() {
},
//我的唱完卡
myCard() {
wx.navigateTo({
url: 'myCard/myCard',
})
},
//联系客服
contact() {
wx.navigateTo({
url: 'serviceWeChat/serviceWeChat',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
// pages/my/my.js
Page({
/**
* 页面的初始数据
*/
data: {
},
//兑换
charge() {
wx.navigateTo({
url: '../my/charge/charge',
})
},
//我的资料
myProfile(){
wx.navigateTo({
url: '../my/myProfile/myProfile',
})
},
//跳转我的预约
myAppointment() {
wx.navigateTo({
url: './all-appointment/all-appointment?currentTab=' + 0,
})
},
goNotConfirm() {
wx.navigateTo({
url: './all-appointment/all-appointment?currentTab=' + 1,
})
},
goAppointed() {
wx.navigateTo({
url: './all-appointment/all-appointment?currentTab=' + 2,
})
},
goCanceled() {
wx.navigateTo({
url: './all-appointment/all-appointment?currentTab=' + 3,
})
},
goEnded() {
wx.navigateTo({
url: './all-appointment/all-appointment?currentTab=' + 4,
})
},
//我的唱完卡
myCard() {
wx.navigateTo({
url: 'myCard/myCard',
})
},
//联系客服
contact() {
wx.navigateTo({
url: 'serviceWeChat/serviceWeChat',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -10,7 +10,7 @@
<view class='phone_num'>139****0939</view>
</view>
</view>
<view class='my_info_box'>
<view class='my_info_box' bindtap='myProfile'>
<view class='iconfont icon-bianji2'></view>
<view>我的资料</view>
</view>
... ... @@ -26,25 +26,25 @@
</view>
</view>
<view class='list_tab_box'>
<view class='tab_item'>
<view class='tab_item' bindtap="goNotConfirm">
<view class='list_img'>
<image src='../../images/my1.png'></image>
</view>
<view>待确认</view>
</view>
<view class='tab_item'>
<view class='tab_item' bindtap="goAppointed">
<view class='list_img'>
<image src='../../images/my1.png'></image>
</view>
<view>已预约</view>
</view>
<view class='tab_item'>
<view class='tab_item' bindtap="goCanceled">
<view class='list_img'>
<image src='../../images/my1.png'></image>
</view>
<view>已取消</view>
</view>
<view class='tab_item'>
<view class='tab_item' bindtap="goEnded">
<view class='list_img'>
<image src='../../images/my1.png'></image>
</view>
... ... @@ -57,7 +57,7 @@
<view class='list_title'>我的畅玩卡</view>
<view class='iconfont icon-fanhui'></view>
</view>
<view class='info_box'>
<view class='info_box' bindtap='charge'>
<view class='list_title'>兑换</view>
</view>
<view class='info_box' bindtap='contact'>
... ...
// pages/MyProfile/MyProfile.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
// pages/MyProfile/MyProfile.js
Page({
/**
* 页面的初始数据
*/
data: {
},
//跟换手机号
chargePhoneNum() {
wx.navigateTo({
url: '../chargePhoneNum/chargePhoneNum',
})
},
//添加学员
addUser() {
wx.navigateTo({
url: '../../index/confirm-appointment-info/add-student/add-student',
})
},
//编辑学员信息
editInfo() {
wx.navigateTo({
url: '../../index/confirm-appointment-info/add-student/add-student',
})
},
//续卡
renewalInfo() {
wx.navigateTo({
url: '../myCard/myCard',
})
},
//购卡
buyCard() {
wx.navigateTo({
url: '../myCard/myCard',
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function() {
}
})
\ No newline at end of file
... ...
... ... @@ -9,17 +9,18 @@
</view>
<view class='info_box'>
<view>手机号:188*****888</view>
<view>更换手机号</view>
<view class='info_content' bindtap='chargePhoneNum'>更换手机号</view>
</view>
<view class='title_box'>
<view class='list_title'>我的学员</view>
<view class='add_box'>
<view class='add_box' bindtap='addUser'>
<text class='iconfont icon-jia'></text>
<text>添加学员</text>
</view>
</view>
<!-- 未绑定年卡,就需要显示为“购卡”;已有年卡就显示为“续卡” -->
<view class='box'>
<view class='list_item' wx:for='{{[1,1]}}' wx:key=''>
<view class='list_item'>
<view class='list_info'>
<text>姓名:男</text>
<text>性 别:男</text>
... ... @@ -29,11 +30,26 @@
<text>所在城市:北京</text>
</view>
<view class='list_label_box'>
<view class='label_item edit_btn'>编辑学员信息</view>
<view class='label_item renewal_btn'>续卡</view>
<view class='label_item'>删除学员</view>
<view class='label_item edit_btn' bindtap='editInfo'>编辑学员信息</view>
<view class='label_item renewal_btn' bindtap='renewalInfo'>续卡</view>
<view class='label_item' bindtap='delUser'>删除学员</view>
</view>
<view class='hint_info'>畅玩卡周期:2018.10.01-2019.10.01</view>
</view>
<view class='list_item'>
<view class='list_info'>
<text>姓名:男</text>
<text>性 别:男</text>
</view>
<view class='list_info'>
<text>生日:2000.01.01</text>
<text>所在城市:北京</text>
</view>
<view class='list_label_box'>
<view class='label_item edit_btn' bindtap='editInfo'>编辑学员信息</view>
<view class='label_item renewal_btn' bindtap='buyCard'>购卡</view>
<view class='label_item' bindtap='delUser'>删除学员</view>
</view>
<view class='hint_info'>无绑定畅玩卡</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -46,6 +46,13 @@ page {
background: #fff;
padding: 34rpx 40rpx;
margin-top: 20rpx;
font-size: 32rpx;
color: #464646;
}
.info_content {
font-size: 24rpx;
color: #3fa9f5;
}
.title_box {
... ... @@ -56,7 +63,9 @@ page {
}
.icon-jia {
display: inline-block;
display: flex;
align-items: center;
justify-content: center;
width: 34rpx;
height: 34rpx;
background: #3fa9f5;
... ... @@ -97,8 +106,8 @@ page {
.list_item {
width: 100%;
background: #fff;
padding:0 20rpx;
min-height: 210rpx;
padding: 0 20rpx;
min-height: 230rpx;
box-sizing: border-box;
position: relative;
overflow: hidden;
... ... @@ -110,11 +119,12 @@ page {
display: flex;
align-items: center;
justify-content: space-between;
padding:10rpx 20rpx;
border-bottom: 1rpx solid #DEDEDE;
padding: 10rpx 20rpx;
border-bottom: 1rpx solid #dedede;
}
.list_info:nth-child(2){
border-bottom: 0rpx;
.list_info:nth-child(2) {
border-bottom: 0rpx;
}
.list_info text {
... ... @@ -123,35 +133,41 @@ page {
font-size: 28rpx;
color: #6e6e6e;
}
.list_label_box{
.list_label_box {
display: flex;
align-items: center;
justify-content: flex-end;
margin: 10rpx 0;
}
.label_item{
.label_item {
width: 130rpx;
height: 40rpx;
border: 1rpx solid #3FA9F5;
border: 1rpx solid #3fa9f5;
border-radius: 10rpx;
font-size: 18rpx;
color: #3FA9F5;
color: #3fa9f5;
display: flex;
align-items: center;
justify-content: center;
margin-left: 30rpx;
}
.edit_btn,.renewal_btn{
background: #3FA9F5;
.edit_btn, .renewal_btn {
background: #3fa9f5;
color: #fff;
border: 0;
}
.renewal_btn{
background: #FC5B63;
.renewal_btn {
background: #fc5b63;
}
.hint_info{
.hint_info {
width: 100%;
height: 40rpx;
background: #3FA9F5;
background: #3fa9f5;
color: #fff;
font-size: 18rpx;
line-height: 40rpx;
... ... @@ -159,4 +175,4 @@ page {
position: absolute;
bottom: 0;
left: 0;
}
\ No newline at end of file
}
... ...
... ... @@ -3,21 +3,21 @@
<view class="title_box">
<view class="line"></view>
<text wx:if="{{is_this_week}}">本周实验</text>
<text wx:if="{{!is_this_week}}">往期实验</text>
<text wx:if="{{!is_this_week}}" bindtap="goTestDetail">往期实验</text>
</view>
<view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail">
<view class="test_box">
<view class="time">{{item.time}}</view>
<view class="img_box">
<image src="{{item.url}}"></image>
</view>
</view>
<view wx:for="{{info}}" wx:key="index" data-index="{{index}}" bindtap="goTestDetail">
<view class="test_box">
<view class="time">{{item.time}}</view>
<view class="img_box">
<image src="{{item.url}}"></image>
</view>
</view>
<view class="order_box">
<text wx:if="{{!ordered && !is_past}}" catchtap="goAppointment" data-index="{{index}}">前往预约</text>
<text wx:if="{{is_past}}">查看</text>
</view>
<view class="order_box">
<text wx:if="{{!ordered && !is_past}}" catchtap="goAppointment" data-index="{{index}}">前往预约</text>
<text wx:if="{{is_past}}">查看</text>
</view>
</view>
</view>
</template>
\ No newline at end of file
... ...