視圖代碼,使用變量控制隱藏類名
-
<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">聯(lián)系電話:</view>
-
<view class='form-group'>
-
<input type="text" name="txttel" placeholder="請輸入您的聯(lián)系電話" />
-
</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">咨詢內(nèi)容:</view>
-
<view class='form-group'>
-
<textarea auto-height name="txtcontent" placeholder="請輸入您的咨詢內(nèi)容" />
-
</view>
-
</view>
-
<view class="weui-msg__text-area">
-
<button class="btns" formType="submit" size="default"> 我要咨詢 </button>
-
</view>
-
Page({
-
/**
-
* 頁面的初始數(shù)據(jù)
-
*/
-
data: {
-
tipsshow:''
-
},
-
-
-
btn_cbback_tab: function (e) {
-
-
-
if (e.detail.value!="")
-
{
-
this.setData({
-
tipsshow: 'undis'
-
})
-
}
-
else
-
{
-
this.setData({
-
tipsshow: ''
-
})
-
-
-
}
-
-
-
-
-
-
},
-
onLoad: function (options) {
-
-
},
-
-
-
/**
-
* 生命周期函數(shù)--監(jiān)聽頁面初次渲染完成
-
*/
-
onReady: function () {
-
-
},
-
-
-
/**
-
* 生命周期函數(shù)--監(jiān)聽頁面顯示
-
*/
-
onShow: function () {
-
-
},
-
-
-
/**
-
* 生命周期函數(shù)--監(jiān)聽頁面隱藏
-
*/
-
onHide: function () {
-
-
},
-
-
-
/**
-
* 生命周期函數(shù)--監(jiān)聽頁面卸載
-
*/
-
onUnload: function () {
-
-
},
-
-
-
/**
-
* 頁面相關事件處理函數(shù)--監(jiān)聽用戶下拉動作
-
*/
-
onPullDownRefresh: function () {
-
-
},
-
-
-
/**
-
* 頁面上拉觸底事件的處理函數(shù)
-
*/
-
onReachBottom: function () {
-
-
},
-
-
-
/**
-
* 用戶點擊右上角分享
-
*/
-
onShareAppMessage: function () {
-
-
},
-
-
-
/**
-
* 頁面上拉觸底事件的處理函數(shù)
-
*/
-
onReachBottom: function () {
-
-
},
-
-
-
/**
-
* 頁面相關事件處理函數(shù)--監(jiān)聽用戶下拉動作
-
*/
-
onPullDownRefresh: function () {
-
-
}
-
})
|