Commit 9ce9badb by TengFengLian

修改 toast image

parent 27458ba7
...@@ -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,16 @@ Page({ ...@@ -314,18 +313,16 @@ 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,
}) })
var that = this var that = this
app.wxRequest({ app.wxRequest({
...@@ -340,16 +337,12 @@ Page({ ...@@ -340,16 +337,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}}">
......
...@@ -132,7 +132,7 @@ Page({ ...@@ -132,7 +132,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,
...@@ -195,18 +194,15 @@ Page({ ...@@ -195,18 +194,15 @@ Page({
app.login({ app.login({
success: function() { success: function() {
if (!that.inspectForm() || that.data.isSubmit) { if (!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,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/subscribe/doSubscribe', url: '/api/v1/subscribe/doSubscribe',
...@@ -220,18 +216,14 @@ Page({ ...@@ -220,18 +216,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>
......
...@@ -205,6 +205,7 @@ Page({ ...@@ -205,6 +205,7 @@ Page({
icon: 'loading', icon: 'loading',
title: '提交中', title: '提交中',
show: true, show: true,
mask: true,
}) })
app.wxRequest({ app.wxRequest({
url: '/api/v1/smFeedback/doFeedBack', url: '/api/v1/smFeedback/doFeedBack',
...@@ -212,20 +213,20 @@ Page({ ...@@ -212,20 +213,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,
}) })
} }
}) })
......
<!--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>
......
...@@ -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(() => {
...@@ -220,8 +220,8 @@ Page({ ...@@ -220,8 +220,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 +230,8 @@ Page({ ...@@ -230,8 +230,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">
......
...@@ -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