Commit 832cc023 by 严立

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

parents d3b84334 483f42ed
...@@ -63,27 +63,13 @@ Page({ ...@@ -63,27 +63,13 @@ Page({
}, },
onContact: function () { onContact: function () {
switch(this.data.activeState) {
case 0: if (this.data.activeState == 1) {
wx.lin.showToast({ wx.navigateTo({
title: '活动未开始', url: '/pages/activity-entry/activity-entry?id='+this.data.id
icon: 'error', })
})
return
break;
case 1:
break;
case 2:
wx.lin.showToast({
title: '报名已截止',
icon: 'error',
})
return
break;
} }
wx.navigateTo({
url: '/pages/activity-entry/activity-entry?id='+this.data.id
})
}, },
/** /**
......
...@@ -27,7 +27,6 @@ Page({ ...@@ -27,7 +27,6 @@ Page({
errorSession: '', errorSession: '',
errorQuantity: '', errorQuantity: '',
canSubmit: false, canSubmit: false,
isSubmit: false,
// 接口参数 // 接口参数
id: '', id: '',
}, },
...@@ -314,18 +313,17 @@ Page({ ...@@ -314,18 +313,17 @@ Page({
// 活动报名 // 活动报名
doActivityEnroll() { doActivityEnroll() {
if (!this.inspectForm() || this.data.isSubmit) { if (!this.inspectForm()) {
return return
} }
this.setData({
isSubmit: true,
})
var activityTime = this.data.activityTimes[this.data.activityIndex] var activityTime = this.data.activityTimes[this.data.activityIndex]
let formInto = this.data.formInto let formInto = this.data.formInto
wx.lin.showToast({ wx.lin.showToast({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true, show: true,
mask: true,
duration: 1000*60,
}) })
var that = this var that = this
app.wxRequest({ app.wxRequest({
...@@ -340,16 +338,12 @@ Page({ ...@@ -340,16 +338,12 @@ Page({
success: function(res) { success: function(res) {
that.setData({ that.setData({
entryComplete: true, entryComplete: true,
isSubmit: false,
}) })
wx.lin.hideToast() wx.lin.hideToast()
}, },
fail: function(err) { fail: function(err) {
that.setData({
isSubmit: false,
})
wx.lin.showToast({ wx.lin.showToast({
icon: 'error', image: '/image/error.png',
title: err.msg, title: err.msg,
}) })
} }
......
<l-toast></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="活动报名" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="活动报名" backIcon="/image/back.png"></navigation>
<view class="entry-complete row con-c align-c" wx:if="{{entryComplete}}"> <view class="entry-complete row con-c align-c" wx:if="{{entryComplete}}">
......
...@@ -103,6 +103,7 @@ Page({ ...@@ -103,6 +103,7 @@ Page({
icon: 'loading', icon: 'loading',
title: '正在加载', title: '正在加载',
show: true, show: true,
duration: 1000*60,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/activity/getMyActivityDetail', url: '/api/v1/activity/getMyActivityDetail',
...@@ -132,7 +133,7 @@ Page({ ...@@ -132,7 +133,7 @@ Page({
}, },
fail: function(err) { fail: function(err) {
wx.lin.showToast({ wx.lin.showToast({
icon: 'error', image: '/image/error.png',
title: err.msg, title: err.msg,
}) })
} }
......
<l-toast></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="报名详情" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="报名详情" backIcon="/image/back.png"></navigation>
<view class="container"> <view class="container">
......
...@@ -19,7 +19,6 @@ Page({ ...@@ -19,7 +19,6 @@ Page({
canSubmit: false, canSubmit: false,
winQuota: false, winQuota: false,
isSubmit: false,
// 预约入园剩余名额 // 预约入园剩余名额
total: 0, total: 0,
...@@ -64,16 +63,41 @@ Page({ ...@@ -64,16 +63,41 @@ Page({
this.setData({ this.setData({
formName: funcValue formName: funcValue
}) })
if (this.data.formName === '') {
this.setData({
errorName: '请输入姓名'
})
} else {
this.setData({
errorName: ''
})
}
break break
case 'phone': case 'phone':
this.setData({ this.setData({
formPhone: funcValue formPhone: funcValue
}) })
if (this.data.formPhone === '') {
this.setData({
errorPhone: '请输入手机号码'
})
} else if (this.data.formPhone.length != 11) {
this.setData({
errorPhone: '请输入11位手机号码'
})
} else {
this.setData({
errorPhone: ''
})
}
break break
} }
this.inspectForm()
}, },
onQuantityCut: function () { onQuantityCut: function () {
...@@ -118,12 +142,12 @@ Page({ ...@@ -118,12 +142,12 @@ Page({
}, },
inspectForm: function () { inspectForm: function () {
let complete = true
if (this.data.formName === '') { if (this.data.formName === '') {
this.setData({ this.setData({
canSubmit: false,
errorName: '请输入姓名' errorName: '请输入姓名'
}) })
return complete = false
} else { } else {
this.setData({ this.setData({
errorName: '' errorName: ''
...@@ -132,16 +156,14 @@ Page({ ...@@ -132,16 +156,14 @@ Page({
if (this.data.formPhone === '') { if (this.data.formPhone === '') {
this.setData({ this.setData({
canSubmit: false,
errorPhone: '请输入手机号码' errorPhone: '请输入手机号码'
}) })
return complete = false
} else if (this.data.formPhone.length != 11) { } else if (this.data.formPhone.length != 11) {
this.setData({ this.setData({
canSubmit: false,
errorPhone: '请输入11位手机号码' errorPhone: '请输入11位手机号码'
}) })
return complete = false
} else { } else {
this.setData({ this.setData({
errorPhone: '' errorPhone: ''
...@@ -150,10 +172,9 @@ Page({ ...@@ -150,10 +172,9 @@ Page({
if (this.data.formQuantity === 0) { if (this.data.formQuantity === 0) {
this.setData({ this.setData({
canSubmit: false,
errorQuantity: '预约人数不能为 0' errorQuantity: '预约人数不能为 0'
}) })
return complete = false
} else { } else {
this.setData({ this.setData({
errorQuantity: '' errorQuantity: ''
...@@ -161,9 +182,11 @@ Page({ ...@@ -161,9 +182,11 @@ Page({
} }
this.setData({ this.setData({
canSubmit: true canSubmit: complete
}) })
return complete
}, },
onSubmit: function () { onSubmit: function () {
...@@ -171,19 +194,16 @@ Page({ ...@@ -171,19 +194,16 @@ Page({
app.login({ app.login({
success: function() { success: function() {
if (!that.data.canSubmit || that.data.isSubmit) { if (!that.inspectForm()) {
// that.inspectForm()
return return
} }
that.setData({
isSubmit: true
})
wx.lin.showToast({ wx.lin.showToast({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true, show: true,
mask: true,
duration: 1000*60,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/subscribe/doSubscribe', url: '/api/v1/subscribe/doSubscribe',
...@@ -197,18 +217,14 @@ Page({ ...@@ -197,18 +217,14 @@ Page({
success: function(res) { success: function(res) {
that.setData({ that.setData({
appointmentComplete: true, appointmentComplete: true,
isSubmit: false
}) })
wx.lin.hideToast() wx.lin.hideToast()
}, },
fail: function(err) { fail: function(err) {
wx.lin.showToast({ wx.lin.showToast({
icon: 'error', image: '/image/error.png',
title: err.msg, title: err.msg,
}) })
that.setData({
isSubmit: false
})
} }
}) })
......
<l-toast></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<!-- 首页 - 入园预约 / 房屋预约 --> <!-- 首页 - 入园预约 / 房屋预约 -->
<navigation class="navigation" backIcon="/image/back-w.png"></navigation> <navigation class="navigation" backIcon="/image/back-w.png"></navigation>
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<text>人</text> <text>人</text>
<text>数</text> <text>数</text>
</view> </view>
<view class="input-wrap row con-b align-c"> <view class="input-wrap row con-b align-c" style="padding: 0">
<l-button special="{{true}}" bind:lintap="onQuantityCut"> <l-button special="{{true}}" bind:lintap="onQuantityCut">
<image class="input-icon" src="../../image/cut.png"></image> <image class="input-icon" src="../../image/cut.png"></image>
</l-button> </l-button>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<text>日</text> <text>日</text>
<text>期</text> <text>期</text>
</view> </view>
<view class="input-wrap row con-b align-c"> <view class="input-wrap row con-b align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate"> <picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" end="{{appointmentEndDate}}" bindchange="onSelectionDate">
<view class="picker text">{{formDate}}</view> <view class="picker text">{{formDate}}</view>
</picker> </picker>
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
<text>日</text> <text>日</text>
<text>期</text> <text>期</text>
</view> </view>
<view class="input-wrap row align-c"> <view class="input-wrap row align-c" style="padding: 0 0 0 24rpx">
<picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" bindchange="onSelectionDate"> <picker class="input-picker" mode="date" value="{{date}}" start="{{appointmentDate}}" bindchange="onSelectionDate">
<view class="picker text">{{formDate}}</view> <view class="picker text">{{formDate}}</view>
</picker> </picker>
......
...@@ -103,8 +103,9 @@ ...@@ -103,8 +103,9 @@
} }
.input-icon { .input-icon {
width: 32rpx; width: 80rpx;
height: 32rpx; height: 80rpx;
padding: 22rpx;
} }
.input-picker { .input-picker {
...@@ -186,4 +187,4 @@ ...@@ -186,4 +187,4 @@
font-weight: 500; font-weight: 500;
color: #ffffff; color: #ffffff;
line-height: 42rpx; line-height: 42rpx;
} }
\ No newline at end of file
...@@ -139,6 +139,14 @@ Page({ ...@@ -139,6 +139,14 @@ Page({
url: '../moreProblems/moreProblems', url: '../moreProblems/moreProblems',
}) })
}, },
tranform(e){
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`commonProblems[${index}].flag`]:flag
});
console.log(this.data.commonProblems);
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -205,6 +213,8 @@ Page({ ...@@ -205,6 +213,8 @@ Page({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true, show: true,
mask: true,
duration: 1000*60,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/smFeedback/doFeedBack', url: '/api/v1/smFeedback/doFeedBack',
...@@ -212,20 +222,20 @@ Page({ ...@@ -212,20 +222,20 @@ Page({
content: that.data.remark content: that.data.remark
}, },
success: function(res) { success: function(res) {
wx.lin.showToast({
image: '/image/success.png',
title: '提交成功',
})
that.setData({ that.setData({
inputHidden:true, inputHidden:true,
title:'客服中心', title:'客服中心',
remark: '', remark: '',
}) })
wx.lin.showToast({
icon: 'success',
title: '提交成功',
})
}, },
fail: function(err) { fail: function(err) {
wx.lin.showToast({ wx.lin.showToast({
icon: 'error', image: '/image/error.png',
title: err.msg, title: err.msg,
}) })
} }
}) })
...@@ -241,7 +251,9 @@ Page({ ...@@ -241,7 +251,9 @@ Page({
top: 1, top: 1,
}, },
success: function(res) { success: function(res) {
res.data.forEach(function(item){
item.flag = false;
});
that.setData({ that.setData({
commonProblems: res.data commonProblems: res.data
}) })
......
<!--pages/customerService/customerService.wxml--> <!--pages/customerService/customerService.wxml-->
<l-toast></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="{{title}}" backIcon="/image/back-w.png" color="#ffffff"></navigation> <navigation class="navigation" titleText="{{title}}" backIcon="/image/back-w.png" color="#ffffff"></navigation>
<view class="container"> <view class="container">
<image class="banner-img" src="http://upload.miaomiao-bao.com/70161202008161703131621.jpg"></image> <image class="banner-img" src="http://upload.miaomiao-bao.com/70161202008161703131621.jpg"></image>
...@@ -15,16 +15,16 @@ ...@@ -15,16 +15,16 @@
<view class="content"> <view class="content">
<view class="content-item" wx:for="{{commonProblems}}" wx:key="index"> <view class="content-item" wx:for="{{commonProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}"> <l-collapse-item l-body-class="l-body-class" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="tranform" l-title-class="l-title-class" customTitle="{{true}}">
<view class="item-title" slot="title"> <view class="item-title" slot="title">
<view class="row align-c" style="width:90%;"> <view class="row align-c" style="width:90%;">
<view class="circle"></view> <view class="circle"></view>
<view style="width:540rpx;">{{item.title}}</view> <view style="width:540rpx;">{{item.title}}</view>
</view> </view>
<l-icon name="right" size="28" color="#999"/> <l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999"/>
</view> </view>
<text class="text">{{item.content}}</text> <view class="text">{{item.content}}</view>
</l-collapse-item> </l-collapse-item>
</l-collapse> </l-collapse>
</view> </view>
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
margin: auto; margin: auto;
height: auto; height: auto;
} }
.tranform{
transform: rotate(90deg);
}
.customer-body-header{ .customer-body-header{
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -180,6 +183,7 @@ ...@@ -180,6 +183,7 @@
} }
.text{ .text{
width: 610rpx; width: 610rpx;
height: auto;
margin: auto; margin: auto;
line-height: 2; line-height: 2;
font-size: 28rpx; font-size: 28rpx;
......
...@@ -76,7 +76,27 @@ Page({ ...@@ -76,7 +76,27 @@ Page({
onShareAppMessage: function () { onShareAppMessage: function () {
}, },
checkInTranform(e){
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`checkInProblems[${index}].flag`]:flag
});
},
ticketsTranform(e){
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`ticketsProblems[${index}].flag`]:flag
});
},
tranform(e){
let flag = !e.currentTarget.dataset.flag
let index = e.currentTarget.dataset.index;
this.setData({
[`serviceProblems[${index}].flag`]:flag
});
},
// 常见问题 // 常见问题
getCommonProblem(type) { getCommonProblem(type) {
let that = this let that = this
...@@ -87,6 +107,9 @@ Page({ ...@@ -87,6 +107,9 @@ Page({
top: '', top: '',
}, },
success: function(res) { success: function(res) {
res.data.forEach(function(item){
item.flag =false;
})
switch (type) { switch (type) {
case 1: case 1:
that.setData({ that.setData({
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
<view class="content"> <view class="content">
<view class="content-item" wx:for="{{checkInProblems}}" wx:key="index"> <view class="content-item" wx:for="{{checkInProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}"> <l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="checkInTranform">
<view class="item-title" slot="title"> <view class="item-title" slot="title" >
<view class="row align-c"> <view class="row align-c">
<view class="circle"></view> <view class="circle"></view>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
<l-icon name="right" size="28" color="#999"/> <l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999"/>
</view> </view>
<text class="text">{{item.content}}</text> <text class="text">{{item.content}}</text>
...@@ -40,16 +40,16 @@ ...@@ -40,16 +40,16 @@
<view class="content"> <view class="content">
<view class="content-item" wx:for="{{ticketsProblems}}" wx:key="index"> <view class="content-item" wx:for="{{ticketsProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}"> <l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="ticketsTranform">
<view class="item-title" slot="title"> <view class="item-title" slot="title" >
<view class="row align-c"> <view class="row align-c">
<view class="circle"></view> <view class="circle"></view>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
<l-icon name="right" size="28" color="#999"/> <l-icon l-class="{{item.flag ? 'tranform':''}}" name="right" size="28" color="#999"/>
</view> </view>
<text class="text">{{item.content}}</text> <view class="text">{{item.content}}</view>
</l-collapse-item> </l-collapse-item>
</l-collapse> </l-collapse>
</view> </view>
...@@ -66,16 +66,16 @@ ...@@ -66,16 +66,16 @@
<view class="content"> <view class="content">
<view class="content-item" wx:for="{{serviceProblems}}" wx:key="index"> <view class="content-item" wx:for="{{serviceProblems}}" wx:key="index">
<l-collapse> <l-collapse>
<l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}"> <l-collapse-item l-body-class="l-body-class" l-title-class="l-title-class" customTitle="{{true}}" data-index="{{index}}" data-flag="{{item.flag}}" bindtap="tranform">
<view class="item-title" slot="title"> <view class="item-title" slot="title" >
<view class="row align-c"> <view class="row align-c">
<view class="circle"></view> <view class="circle"></view>
<view>{{item.title}}</view> <view>{{item.title}}</view>
</view> </view>
<l-icon name="right" size="28" color="#999"/> <l-icon name="right" l-class="{{item.flag ? 'tranform':''}}" size="28" color="#999"/>
</view> </view>
<text class="text">{{item.content}}</text> <view class="text">{{item.content}}</view>
</l-collapse-item> </l-collapse-item>
</l-collapse> </l-collapse>
</view> </view>
......
...@@ -48,8 +48,13 @@ ...@@ -48,8 +48,13 @@
} }
.text{ .text{
width: 610rpx; width: 610rpx;
height: auto;
margin: auto; margin: auto;
line-height: 2; line-height: 2;
font-size: 28rpx; font-size: 28rpx;
padding-left: 40rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
}
.tranform{
transform: rotate(90deg);
} }
\ No newline at end of file
...@@ -141,7 +141,7 @@ Page({ ...@@ -141,7 +141,7 @@ Page({
if (nickName == '') { if (nickName == '') {
wx.lin.showToast({ wx.lin.showToast({
icon: 'error', image: '/image/error.png',
title: '请填写姓名', title: '请填写姓名',
}) })
return return
......
<!--pages/myInfo/myInfo.wxml--> <!--pages/myInfo/myInfo.wxml-->
<l-toast></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" titleText="个人资料" backIcon="/image/back.png"></navigation> <navigation class="navigation" titleText="个人资料" backIcon="/image/back.png"></navigation>
<view class="container"> <view class="container">
......
...@@ -167,7 +167,7 @@ Page({ ...@@ -167,7 +167,7 @@ Page({
case 0: type = 2; break; case 0: type = 2; break;
case 1: case 1:
wx.lin.showToast({ wx.lin.showToast({
icon: 'success', image: '/image/success.png',
title: '已审核通过', title: '已审核通过',
}) })
setTimeout(() => { setTimeout(() => {
...@@ -208,7 +208,8 @@ Page({ ...@@ -208,7 +208,8 @@ Page({
wx.lin.showToast({ wx.lin.showToast({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true show: true,
duration: 1000*60,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/userAuth/doAuth', url: '/api/v1/userAuth/doAuth',
...@@ -220,8 +221,8 @@ Page({ ...@@ -220,8 +221,8 @@ Page({
}, },
success: function(res) { success: function(res) {
wx.lin.showToast({ wx.lin.showToast({
icon: 'success', image: '/image/success.png',
title: '提交成功', title: '提交成功',
}) })
that.setData({ that.setData({
type: 2 type: 2
...@@ -230,8 +231,8 @@ Page({ ...@@ -230,8 +231,8 @@ Page({
}, },
fail: function(err) { fail: function(err) {
wx.lin.showToast({ wx.lin.showToast({
icon: 'error', image: '/image/error.png',
title: err.msg, title: err.msg,
}) })
} }
......
<l-toast></l-toast> <l-toast l-image-class="toast-image"></l-toast>
<navigation class="navigation" backIcon="/image/back-w.png"></navigation> <navigation class="navigation" backIcon="/image/back-w.png"></navigation>
<view class="container"> <view class="container">
<view class="header"> <view class="header">
......
...@@ -107,6 +107,13 @@ ...@@ -107,6 +107,13 @@
"id": -1, "id": -1,
"name": "pages/ownerCertification/ownerCertification", "name": "pages/ownerCertification/ownerCertification",
"pathName": "pages/ownerCertification/ownerCertification", "pathName": "pages/ownerCertification/ownerCertification",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/moreProblems/moreProblems",
"pathName": "pages/moreProblems/moreProblems",
"scene": null "scene": null
} }
] ]
......
...@@ -25,4 +25,9 @@ button { ...@@ -25,4 +25,9 @@ button {
button::after { button::after {
border: none; border: none;
}
.toast-image {
width: 80rpx;
height: 80rpx;
} }
\ No newline at end of file
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 sign in to comment