Commit 832cc023 by 严立

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

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