作者 刘晓艳

科学小队长逻辑连接

... ... @@ -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 class="order_btn" bindtap='goAppointment'>去预约</view>
</view>
</view>
\ No newline at end of file
... ...
... ... @@ -8,11 +8,11 @@ for (let i = 1990; i <= date.getFullYear(); i++) {
years.push(i)
}
for (let i = 1 ; i <= 12; i++) {
for (let i = 1; i <= 12; i++) {
months.push(i)
}
for (let i = 1 ; i <= 31; i++) {
for (let i = 1; i <= 31; i++) {
days.push(i)
}
... ... @@ -23,8 +23,8 @@ Page({
*/
data: {
name: '',
sex: ['男','女'],
city: ['北京市','天津市','河北省'],
sex: ['男', '女'],
city: ['北京市', '天津市', '河北省'],
years: years,
year: date.getFullYear(),
months: months,
... ... @@ -34,7 +34,9 @@ Page({
value: [9999, 1, 1],
},
inputName(e) {
this.setData({name: e.detail.value});
this.setData({
name: e.detail.value
});
},
//选择性别
sexPickerChange: function(e) {
... ... @@ -68,68 +70,70 @@ Page({
},
//保存
clickSave() {
if(this.data.name === '') {
if (this.data.name === '') {
wx.showToast({
title: '请填写学员姓名',
icon: 'none'
})
}else {
wx.navigateBack({delta: 1})
} else {
wx.navigateTo({
url: '../../../my/myProfile/myProfile',
})
}
},
/**
* 生命周期函数--监听页面加载
*/
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
... ...
... ... @@ -8,9 +8,20 @@ Page({
show: false,
is_showModal: false,
is_showSuccessModal: false,
children: [{name:'张三',is_choose: true},
{name:'李思思', is_choose: false},
{name:'迪丽热巴-迪力木拉提',is_choose: false}],
pay_success: false,
children: [{
name: '张三',
is_choose: true
},
{
name: '李思思',
is_choose: false
},
{
name: '迪丽热巴-迪力木拉提',
is_choose: false
}
],
is_choose: false,
},
chooseChildren(e) {
... ... @@ -20,83 +31,118 @@ Page({
[`children[${current}].is_choose`]: !this.data.children[current].is_choose
})
},
refreshModal() {
this.setData({
pay_success: true
});
},
submit() {
this.setData({is_showModal: true})
if(this.data.pay_success) {
this.setData({
is_showModal: false,
is_showSuccessModal: true,
});
}else {
this.setData({
is_showModal: true
});
}
},
chooseNo(e) {
this.setData({currentBtn: e.currentTarget.dataset.index,is_showModal: false})
wx.switchTab({url: '/pages/index/index'})
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
// is_showSuccessModal: true
})
wx.navigateTo({
url: '../../my/buyCard/buyCard',
})
},
modalConfirm() {
this.setData({is_showSuccessModal: false})
this.setData({
is_showSuccessModal: false
})
wx.redirectTo({
url: '../../my/all-appointment/all-appointment?currentTab=' + 2,
})
},
disableScroll() {},
addStudent() {
wx.navigateTo({url: './add-student/add-student'})
wx.navigateTo({
url: './add-student/add-student'
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
onShow: function() {
const self = this;
setTimeout(function () {
self.setData({show: true})
},500)
setTimeout(function() {
self.setData({
show: true
})
}, 500)
},
/**
* 生命周期函数--监听页面隐藏
*/
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
... ...
... ... @@ -36,8 +36,7 @@
<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="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>
... ... @@ -50,10 +49,7 @@
</view>
<!--是否购买畅玩卡弹窗-->
<view class="modal_box" wx:if="{{is_showModal}}" catchtouchmove="disableScroll">
<view class="background"
bindtap="handleBackground"
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">
... ... @@ -67,10 +63,7 @@
</view>
<!--预约成功弹窗-->
<view class="modal_box" wx:if="{{is_showSuccessModal}}" catchtouchmove="disableScroll">
<view class="background"
bindtap="handleBackground"
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">
... ...
... ... @@ -9,17 +9,85 @@ Page({
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:'南锣鼓巷实验室'}]},
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},
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},
... ... @@ -28,8 +96,10 @@ Page({
// {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)
... ... @@ -38,38 +108,55 @@ Page({
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})
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})
this.setData({
currentTime: current
})
},
//点击单人预约
singleAppointment() {
this.setData({show_submit_btn: true})
this.setData({
show_submit_btn: true
})
},
//点击双人预约
doubleAppointment() {
this.setData({show_submit_btn: true})
this.setData({
show_submit_btn: true
})
},
submit() {
wx.navigateTo({url: '/pages/index/confirm-appointment-info/confirm-appointment-info'})
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);
... ... @@ -78,49 +165,49 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
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
... ...
... ... @@ -5,65 +5,106 @@ const app = getApp()
Page({
data: {
hasPhone: true,
imgUrls:[
{'url': '../../images/banner.jpg'},
{'url': '../../images/banner.jpg'},
{'url': '../../images/banner.jpg'},],
imgUrls: [{
'url': '../../images/banner.jpg'
},
{
'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'},
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'},
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) { //切换轮播图
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);
console.log(e)
const current = e.currentTarget.dataset.index;
wx.navigateTo({url: './activity-detail/activity-detail'})
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) {
goAppointment(e) {
const current = e.currentTarget.dataset.index;
wx.navigateTo({url: './go-appointment/go-appointment'})
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,
... ...
... ... @@ -5,13 +5,12 @@
<!--轮播图-->
<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>
... ... @@ -32,9 +31,46 @@
</view>
<!--实验列表-->
<import src="/templates/templates.wxml" />
<!-- <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>
<!-- <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 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;
}
... ...
... ... @@ -10,10 +10,10 @@ Page({
time: '获取验证码', //倒计时
currentTime: 61
},
getCode: function (options) {
getCode: function(options) {
var that = this;
var currentTime = that.data.currentTime;
interval = setInterval(function () {
interval = setInterval(function() {
currentTime--;
that.setData({
time: currentTime + '秒'
... ... @@ -35,59 +35,65 @@ Page({
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)
},
/**
... ...
... ... @@ -2,8 +2,7 @@
<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 wx:for="{{tab}}" wx:key="index" bindtap="changeTab" data-index="{{index}}" class="{{currentTab == index?'change-color':''}}">{{item}}</view>
</view>
<!--预约列表-->
... ...
... ... @@ -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({
// pages/my/my.js
Page({
/**
* 页面的初始数据
... ... @@ -7,9 +7,43 @@ 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() {
... ... @@ -78,4 +112,4 @@ Page({
onShareAppMessage: function() {
}
})
\ No newline at end of file
})
\ 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({
// pages/MyProfile/MyProfile.js
Page({
/**
* 页面的初始数据
... ... @@ -8,59 +8,92 @@ Page({
},
//跟换手机号
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) {
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
})
\ 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,10 +119,11 @@ 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){
.list_info:nth-child(2) {
border-bottom: 0rpx;
}
... ... @@ -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;
... ...
... ... @@ -3,7 +3,7 @@
<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">
... ...