反馈页:添加类型tab

master
jscyl13849007907 2 years ago
parent af1efef3e8
commit 4d66d02ba1

@ -9,6 +9,10 @@ Page({
loading: false,
subLoad: false,
success: false,
troubleList:[
"投诉", "建议", "故障", "其他"
],
actived:0
},
/**
@ -25,6 +29,17 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow () { },
handleUpdatType(e){
console.log(e)
this.setData({
actived:e.target.dataset.index
})
},
/**
* 意见提交事件
*

@ -1,8 +1,13 @@
<view class="container">
<view class='type-box display-flex'>
<view wx:for="{{troubleList}}"
class="type-item {{actived == index ? 'type-active' : ''}}" data-item="{{item}}" data-index="{{index}}"
bind:tap="handleUpdatType"
>{{item}}</view>
</view>
<view class="submit" wx:if="{{!success}}" hover-class="none" hover-stop-propagation="false">
<textarea class="bgf textarea br8 f14" value="{{textVal}}" bindinput="getVal" maxlength="140" placeholder="我们想听到您的心声..." placeholder-class="f14 cccc" bindfocus bindconfirm></textarea>
<textarea class="bgf textarea br8 f14" value="{{textVal}}" bindinput="getVal" maxlength="150" placeholder="我们想听到您的心声..." placeholder-class="f14 cccc" bindfocus bindconfirm></textarea>
<button class="normalBtn loginOut f16" hover-class="thover" bindtap="submit" style="margin-top:90px" loading="{{loading}}">提交</button>
<!-- <view class="tac mt16 f14" style="color:#576B95" bindtap="goList" hover-class="thover" hover-stop-propagation="false">查看记录</view> -->
</view>
<view class="success" wx:else hover-class="none" hover-stop-propagation="false">
<view class="tc" style="padding-top: 100px;">

@ -13,3 +13,21 @@
.lh20{
line-height: 20px;
}
.type-box{
margin-bottom: 12px;
}
.type-item{
width: 60px;
height: 30px;
text-align: center;
line-height: 30px;
border-radius: 15px;
margin-right: 8px;
background-color: #fff;
font-size: 16px;
}
.type-active{
background-color: var(--color-ysd);
color:#fff;
}

@ -8,6 +8,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "反馈与建议",
"pathName": "pages/mine/opinion/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/index/index",
"pathName": "pages/index/index",

Loading…
Cancel
Save