视图代码,使用变量控制隐藏类名
-
<scroll-view scroll-y="true" >
-
<view class="user_freeback">
-
<view class="txt">
-
<text> 为了更好地帮助您解决问题,请准确填写您的邮箱地址和电话号码,以便管理员给你答复。</text>
-
</view>
-
</view>
-
<view class="section weui-media-box weui-media-box_appmsg">
-
<view class="section__title">希望回访:</view>
-
<view class='form-group'>
-
<checkbox-group bindchange="btn_cbback_tab">
-
<label style="display: flex;" ><checkbox value="1" checked="checked"/> </label>
-
</checkbox-group>
-
</view>
-
</view>
-
<view class="{{tipsshow}} section weui-media-box weui-media-box_appmsg">
-
<view class="section__title">您的姓名:</view>
-
<view class='form-group'>
-
<input type="text" name="txtusername" placeholder="请输入您的姓名" />
-
</view>
-
</view>
-
-
<view class="{{tipsshow}} section weui-media-box weui-media-box_appmsg">
-
<view class="section__title">您的邮箱:</view>
-
<view class='form-group'>
-
<input type="text" name="txtemail" placeholder="请输入您的邮箱" />
-
</view>
-
</view>
-
<view class="{{tipsshow}} section weui-media-box weui-media-box_appmsg">
-
<view class="section__title">联系电话:</view>
-
<view class='form-group'>
-
<input type="text" name="txttel" placeholder="请输入您的联系电话" />
-
</view>
-
</view>
-
<view class="section weui-media-box weui-media-box_appmsg">
-
<view class="section__title">您的主题:</view>
-
<view class='form-group'>
-
<input type="text" name="txttitle" placeholder="请输入您的您的主题" />
-
</view>
-
</view>
-
<view class="section weui-media-box weui-media-box_appmsg">
-
<view class="section__title">咨询内容:</view>
-
<view class='form-group'>
-
<textarea auto-height name="txtcontent" placeholder="请输入您的咨询内容" />
-
</view>
-
</view>
-
<view class="weui-msg__text-area">
-
<button class="btns" formType="submit" size="default"> 我要咨询 </button>
-
</view>
-
Page({
-
/**
-
* 页面的初始数据
-
*/
-
data: {
-
tipsshow:''
-
},
-
-
-
btn_cbback_tab: function (e) {
-
-
-
if (e.detail.value!="")
-
{
-
this.setData({
-
tipsshow: 'undis'
-
})
-
}
-
else
-
{
-
this.setData({
-
tipsshow: ''
-
})
-
-
-
}
-
-
-
-
-
-
},
-
onLoad: function (options) {
-
-
},
-
-
-
/**
-
* 生命周期函数--监听页面初次渲染完成
-
*/
-
onReady: function () {
-
-
},
-
-
-
/**
-
* 生命周期函数--监听页面显示
-
*/
-
onShow: function () {
-
-
},
-
-
-
/**
-
* 生命周期函数--监听页面隐藏
-
*/
-
onHide: function () {
-
-
},
-
-
-
/**
-
* 生命周期函数--监听页面卸载
-
*/
-
onUnload: function () {
-
-
},
-
-
-
/**
-
* 页面相关事件处理函数--监听用户下拉动作
-
*/
-
onPullDownRefresh: function () {
-
-
},
-
-
-
/**
-
* 页面上拉触底事件的处理函数
-
*/
-
onReachBottom: function () {
-
-
},
-
-
-
/**
-
* 用户点击右上角分享
-
*/
-
onShareAppMessage: function () {
-
-
},
-
-
-
/**
-
* 页面上拉触底事件的处理函数
-
*/
-
onReachBottom: function () {
-
-
},
-
-
-
/**
-
* 页面相关事件处理函数--监听用户下拉动作
-
*/
-
onPullDownRefresh: function () {
-
-
}
-
})
|