提交 de8a69deeda937bf7206c366d9a046dd64131bed

作者 wangyu
1 个父辈 814be092

调整聊天弹窗

... ... @@ -9,7 +9,7 @@ Page({
9 9 data: {
10 10 showModal: false,
11 11 inputValue: "",
12   - comlist: "",
  12 + comlist: ["DDD","SSS","AAA","QQQ","ZZZ"],
13 13 com_id: "",
14 14 choosed_index: 0,
15 15 chatlist: []
... ... @@ -54,7 +54,7 @@ Page({
54 54 if (res.data.items && res.data.items.length > 0) {
55 55 that.setData({
56 56 showModal: true,
57   - comlist: res.data.items
  57 + // comlist: res.data.items
58 58 })
59 59 }
60 60 }
... ... @@ -101,7 +101,7 @@ Page({
101 101 chatlist: that.data.chatlist
102 102 })
103 103 console.log("chatlist", that.data.chatlist)
104   - // that.getChatinfo()
  104 + that.getChatinfo()
105 105 }
106 106 }
107 107 })
... ... @@ -182,17 +182,14 @@ Page({
182 182
183 183 bindChange: function(e) {
184 184 console.log("goselect", e)
  185 + var s = e.currentTarget.id
  186 + // var s = e.detail.value
185 187 this.setData({
186   - com_id: this.data.comlist[e.detail.value].id,
187   - choosed_index: e.detail.value
  188 + com_id: this.data.comlist[s].id,
  189 + choosed_index: s
188 190 })
189 191 },
190 192
191   - bindChange:function(e){
192   - console.log("bindChange", e.detail.value)
193   -
194   - },
195   -
196 193 /**
197 194 * Lifecycle function--Called when page hide
198 195 */
... ...
... ... @@ -31,14 +31,14 @@
31 31 <view class='modal_lg' hidden="{{!showModal}}">
32 32 <text class="text_title">您在多个单位有任职信息,请选择您要在哪家单位咨询问题。</text>
33 33 <view class='divide_line_f5f5f5'></view>
34   - <view style='width:100%;display:flex;flex-direction:column;max-height:486rpx;'>
  34 + <view style='width:100%;display:flex;flex-direction:column;max-height:688rpx;'>
35 35 <view wx:for="{{comlist}}" wx:for-index="idx" bindtap='bindChange' id="{{idx}}">
36 36 <view wx:if="{{idx==choosed_index}}" style='padding:30rpx;display:flex;flex-direction:row;' >
37   - <view class='text_item_blue float_left' >{{item.name}}</view>
  37 + <view class='text_item_blue float_left' >{{item}}</view>
38 38 <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>
39 39 </view>
40 40 <view wx:else style='padding:30rpx;display:flex;' >
41   - <text class='text_item_black float_left' >{{item.name}}</text>
  41 + <text class='text_item_black float_left' >{{item}}</text>
42 42 </view>
43 43 <view class='divide_line_f5f5f5'></view>
44 44 </view>
... ...
... ... @@ -15,7 +15,7 @@
15 15 .modal_lg {
16 16 width: 72%;
17 17 position: fixed;
18   - top: 120px;
  18 + /* top: 120px; */
19 19 left: 0;
20 20 right: 0;
21 21 margin: 0 auto;
... ...
注册登录 后发表评论