提交 60c5cf90aff59163af2451f91f72b3aac78096a4

作者 wangyu
2 个父辈 ca2b5d3a dc94942a

Merge branch 'dev_wy' into dev2.0

@@ -178,7 +178,7 @@ @@ -178,7 +178,7 @@
178 <text class='text_left'>租赁房屋坐落地址</text> 178 <text class='text_left'>租赁房屋坐落地址</text>
179 <text class='text_right_333'>{{datas.house_address_new}}</text> 179 <text class='text_right_333'>{{datas.house_address_new}}</text>
180 </view> 180 </view>
181 - <view style='height:90rpx;clear:both;'> 181 + <view wx:if="{{datas.house_detail_address.length>0}}" style='height:90rpx;clear:both;'>
182 <text class='text_right_333'>{{datas.house_detail_address}}</text> 182 <text class='text_right_333'>{{datas.house_detail_address}}</text>
183 </view> 183 </view>
184 <view style='height:90rpx;width:100%;clear:both;'> 184 <view style='height:90rpx;width:100%;clear:both;'>
@@ -200,7 +200,7 @@ @@ -200,7 +200,7 @@
200 <text class='text_left'>房屋坐落地址</text> 200 <text class='text_left'>房屋坐落地址</text>
201 <text class='text_right_333'>{{datas.house_address_new}}</text> 201 <text class='text_right_333'>{{datas.house_address_new}}</text>
202 </view> 202 </view>
203 - <view style='height:90rpx;clear:both;'> 203 + <view wx:if="{{datas.house_detail_address.length>0}}" style='height:90rpx;clear:both;'>
204 <text class='text_right_333'>{{datas.house_detail_address}}</text> 204 <text class='text_right_333'>{{datas.house_detail_address}}</text>
205 </view> 205 </view>
206 <view style='height:90rpx;width:100%;clear:both;'> 206 <view style='height:90rpx;width:100%;clear:both;'>
@@ -8,10 +8,10 @@ Page({ @@ -8,10 +8,10 @@ Page({
8 */ 8 */
9 data: { 9 data: {
10 showModal: false, 10 showModal: false,
11 - inputValue:"",  
12 - comlist:"",  
13 - com_id:"",  
14 - choosed_index:0, 11 + inputValue: "",
  12 + comlist: "",
  13 + com_id: "",
  14 + choosed_index: 0,
15 chatlist: [] 15 chatlist: []
16 }, 16 },
17 17
@@ -36,22 +36,22 @@ Page({ @@ -36,22 +36,22 @@ Page({
36 36
37 }, 37 },
38 38
39 - getComList:function(){ 39 + getComList: function() {
40 var that = this; 40 var that = this;
41 var Authorization = app.globalData.Authorization; 41 var Authorization = app.globalData.Authorization;
42 wx.request({ 42 wx.request({
43 url: baseUrl + 'uaa/v1/tenants', 43 url: baseUrl + 'uaa/v1/tenants',
44 data: { 44 data: {
45 - all:"true" 45 + all: "true"
46 }, 46 },
47 header: { 47 header: {
48 'content-type': 'application/json', 48 'content-type': 'application/json',
49 "Authorization": Authorization 49 "Authorization": Authorization
50 }, 50 },
51 - success: function (res) { 51 + success: function(res) {
52 if (res && res.data) { 52 if (res && res.data) {
53 console.log("res", res) 53 console.log("res", res)
54 - if (res.data.items && res.data.items.length > 0){ 54 + if (res.data.items && res.data.items.length > 0) {
55 that.setData({ 55 that.setData({
56 showModal: true, 56 showModal: true,
57 comlist: res.data.items 57 comlist: res.data.items
@@ -63,7 +63,7 @@ Page({ @@ -63,7 +63,7 @@ Page({
63 }, 63 },
64 64
65 bindKeyInput(e) { 65 bindKeyInput(e) {
66 - console.log("bindKeyInput",e) 66 + console.log("bindKeyInput", e)
67 this.setData({ 67 this.setData({
68 inputValue: e.detail.value 68 inputValue: e.detail.value
69 }) 69 })
@@ -71,7 +71,7 @@ Page({ @@ -71,7 +71,7 @@ Page({
71 71
72 sendMsg: function() { 72 sendMsg: function() {
73 var that = this; 73 var that = this;
74 - if (this.data.inputValue == "" || this.data.inputValue.replace(/(^\s*)|(\s*$)/g, "")==""){ 74 + if (this.data.inputValue == "" || this.data.inputValue.replace(/(^\s*)|(\s*$)/g, "") == "") {
75 wx.showToast({ 75 wx.showToast({
76 title: '请输入内容', 76 title: '请输入内容',
77 }) 77 })
@@ -83,57 +83,31 @@ Page({ @@ -83,57 +83,31 @@ Page({
83 data: { 83 data: {
84 text: that.data.inputValue 84 text: that.data.inputValue
85 }, 85 },
86 - method:"POST", 86 + method: "POST",
87 header: { 87 header: {
88 'content-type': 'application/json', 88 'content-type': 'application/json',
89 "Authorization": Authorization 89 "Authorization": Authorization
90 }, 90 },
91 success: function(res) { 91 success: function(res) {
92 if (res && res.data) { 92 if (res && res.data) {
93 - console.log("res", res) 93 + console.log("res", res)
94 var databean = {} 94 var databean = {}
95 databean.type = "1" 95 databean.type = "1"
96 databean.text = that.data.inputValue 96 databean.text = that.data.inputValue
97 that.data.chatlist.push(databean) 97 that.data.chatlist.push(databean)
98 that.data.chatlist.push(res.data) 98 that.data.chatlist.push(res.data)
99 that.setData({ 99 that.setData({
100 - inputValue:"", 100 + inputValue: "",
101 chatlist: that.data.chatlist 101 chatlist: that.data.chatlist
102 }) 102 })
103 - console.log("chatlist",that.data.chatlist) 103 + console.log("chatlist", that.data.chatlist)
104 // that.getChatinfo() 104 // that.getChatinfo()
105 } 105 }
106 } 106 }
107 }) 107 })
108 }, 108 },
109 109
110 - cancelhandle: function(e) {  
111 - console.log("cancelhandle", e)  
112 - this.setData({  
113 - showModal: false  
114 - })  
115 - wx.navigateBack({  
116 - delta:1  
117 - })  
118 - },  
119 -  
120 - confirmhandle: function(e) {  
121 - console.log("confirmhandle", e)  
122 - this.setData({  
123 - showModal: false,  
124 - })  
125 - this.refreshToken();  
126 - },  
127 -  
128 - goselect:function(e){  
129 - console.log("goselect",e)  
130 - this.setData({  
131 - com_id: this.data.comlist[e.currentTarget.id].id,  
132 - choosed_index: e.currentTarget.id  
133 - })  
134 - },  
135 -  
136 - refreshToken:function(){ 110 + refreshToken: function() {
137 var that = this; 111 var that = this;
138 wx.request({ 112 wx.request({
139 url: baseUrl + 'uaa/v1/auth/tokens', 113 url: baseUrl + 'uaa/v1/auth/tokens',
@@ -146,9 +120,9 @@ Page({ @@ -146,9 +120,9 @@ Page({
146 header: { 120 header: {
147 'content-type': 'application/json' 121 'content-type': 'application/json'
148 }, 122 },
149 - success:function(res){ 123 + success: function(res) {
150 console.log("refreshToken", res.data) 124 console.log("refreshToken", res.data)
151 - 125 +
152 var user = res.data.user; 126 var user = res.data.user;
153 var tenant = res.data.tenant; 127 var tenant = res.data.tenant;
154 if (tenant) { 128 if (tenant) {
@@ -165,7 +139,7 @@ Page({ @@ -165,7 +139,7 @@ Page({
165 }) 139 })
166 }, 140 },
167 141
168 - getChatinfo:function(){ 142 + getChatinfo: function() {
169 var that = this; 143 var that = this;
170 var Authorization = app.globalData.Authorization; 144 var Authorization = app.globalData.Authorization;
171 wx.request({ 145 wx.request({
@@ -176,7 +150,7 @@ Page({ @@ -176,7 +150,7 @@ Page({
176 'content-type': 'application/json', 150 'content-type': 'application/json',
177 "Authorization": Authorization 151 "Authorization": Authorization
178 }, 152 },
179 - success: function (res) { 153 + success: function(res) {
180 if (res && res.data) { 154 if (res && res.data) {
181 console.log("getChatinfo", res) 155 console.log("getChatinfo", res)
182 that.setData({ 156 that.setData({
@@ -187,6 +161,38 @@ Page({ @@ -187,6 +161,38 @@ Page({
187 }) 161 })
188 }, 162 },
189 163
  164 +
  165 + cancel: function(e) {
  166 + console.log("cancelhandle", e)
  167 + this.setData({
  168 + showModal: false
  169 + })
  170 + wx.navigateBack({
  171 + delta: 1
  172 + })
  173 + },
  174 +
  175 + confirm: function(e) {
  176 + console.log("confirmhandle", e)
  177 + this.setData({
  178 + showModal: false,
  179 + })
  180 + this.refreshToken();
  181 + },
  182 +
  183 + bindChange: function(e) {
  184 + console.log("goselect", e)
  185 + this.setData({
  186 + com_id: this.data.comlist[e.detail.value].id,
  187 + choosed_index: e.detail.value
  188 + })
  189 + },
  190 +
  191 + bindChange:function(e){
  192 + console.log("bindChange", e.detail.value)
  193 +
  194 + },
  195 +
190 /** 196 /**
191 * Lifecycle function--Called when page hide 197 * Lifecycle function--Called when page hide
192 */ 198 */
1 <!--pages/main/smartchat/chat.wxml--> 1 <!--pages/main/smartchat/chat.wxml-->
2 -<view hidden='{{showModal}}'> 2 +<import src="../../../common/picker_cell" />
  3 +
  4 +<view >
3 <scroll-view style='background:#fff;margin-bottom:150rpx'> 5 <scroll-view style='background:#fff;margin-bottom:150rpx'>
4 <view wx:for="{{chatlist}}" wx:for-item="item" style='display:flex;flex-direction:column'> 6 <view wx:for="{{chatlist}}" wx:for-item="item" style='display:flex;flex-direction:column'>
5 <view style='margin:50rpx 60rpx 0 36rpx;display:flex;flex-direction:row' wx:if="{{item.type=='0'}}"> 7 <view style='margin:50rpx 60rpx 0 36rpx;display:flex;flex-direction:row' wx:if="{{item.type=='0'}}">
@@ -25,23 +27,10 @@ @@ -25,23 +27,10 @@
25 </view> 27 </view>
26 28
27 <!-- 自定义弹窗 --> 29 <!-- 自定义弹窗 -->
28 -<view class="mask" catchtouchmove="preventTouchMove" hidden="{{!showModal}}"></view> 30 +<!-- <view class="mask" catchtouchmove="preventTouchMove" hidden="{{!showModal}}"></view>
29 <view class='modal_lg' hidden="{{!showModal}}"> 31 <view class='modal_lg' hidden="{{!showModal}}">
30 <text class="text_title">您在多个单位有任职信息,请选择您要在哪家单位咨询问题。</text> 32 <text class="text_title">您在多个单位有任职信息,请选择您要在哪家单位咨询问题。</text>
31 <view class='divide_line_f5f5f5'></view> 33 <view class='divide_line_f5f5f5'></view>
32 - <!-- <view style='width:100%;display:flex;flex-direction:column;align-items:center;max-height:450rpx'>  
33 - <block wx:for="{{comlist}}" wx:for-index="idx">  
34 - <view wx:if="{{idx==choosed_index}}" bindtap='goselect' id="{{idx}}">  
35 - <text class='text_item_blue float_left'>{{item.name}}</text>  
36 - <image class='icon_choosed' src="/images/icon_chat_choosed.png"></image>  
37 - </view>  
38 - <view wx:else bindtap='goselect' id="{{idx}}">  
39 - <text class='text_item_black float_left'>{{item.name}}</text>  
40 - </view>  
41 - <view class='divide_line_f5f5f5'></view>  
42 - </block>  
43 - </view> -->  
44 -  
45 <view style='width:100%;display:flex;flex-direction:column;max-height:486rpx;'> 34 <view style='width:100%;display:flex;flex-direction:column;max-height:486rpx;'>
46 <view wx:for="{{comlist}}" wx:for-index="idx" bindtap='goselect' id="{{idx}}"> 35 <view wx:for="{{comlist}}" wx:for-index="idx" bindtap='goselect' id="{{idx}}">
47 <view wx:if="{{idx==choosed_index}}" style='padding:30rpx;display:flex;flex-direction:row;' > 36 <view wx:if="{{idx==choosed_index}}" style='padding:30rpx;display:flex;flex-direction:row;' >
@@ -61,4 +50,16 @@ @@ -61,4 +50,16 @@
61 <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view> 50 <view style='width:1px;background:#F5F5F5;margin:20rpx 0'></view>
62 <text class='text_confirm' bindtap='confirmhandle'>确定</text> 51 <text class='text_confirm' bindtap='confirmhandle'>确定</text>
63 </view> 52 </view>
  53 +</view> -->
  54 +
  55 +<view hidden="{{!showModal}}">
  56 + <picker-view indicator-style="height: 50px;" style="width: 100%; height: 300px;" value="{{value}}" bindchange="bindChange" class="picker_wrap">
  57 + <view style=' position: absolute;top:10rpx;width: 100%;z-index: 10;'>
  58 + <view bindtap="cancel" style='float: left;margin: 20rpx;color: #818181;'>取消</view>
  59 + <view bindtap="confirm" style='float: right; margin: 20rpx; color: #2FB42E'>确定</view>
  60 + </view>
  61 + <picker-view-column>
  62 + <view wx:for="{{comlist}}" style="line-height: 50px;padding: 0 30rpx;text-align:center;">{{item.name}}</view>
  63 + </picker-view-column>
  64 + </picker-view>
64 </view> 65 </view>
@@ -94,6 +94,12 @@ white-space:nowrap; @@ -94,6 +94,12 @@ white-space:nowrap;
94 flex: 1; 94 flex: 1;
95 } 95 }
96 96
  97 +.picker_wrap{
  98 +position: fixed;
  99 + bottom: 0rpx;
  100 + background:#fff;
  101 +}
  102 +
97 /* 聊天页面 */ 103 /* 聊天页面 */
98 104
99 .bottom_wrap { 105 .bottom_wrap {
@@ -103,19 +103,17 @@ Page({ @@ -103,19 +103,17 @@ Page({
103 data.items[i].relative = data.items[i].family_ties 103 data.items[i].relative = data.items[i].family_ties
104 if (data.items[i].family_ties=="本人"){ 104 if (data.items[i].family_ties=="本人"){
105 this.self_id = data.items[i].id 105 this.self_id = data.items[i].id
  106 + if (data.items[i].status=='1'){//0已完善 1未完善
  107 + this.setData({
  108 + text_tip: '自然人信息不完善,立即完善'
  109 + })
  110 + }
106 } 111 }
107 - // if (i == 0) {  
108 - // data.items[i].relative = "本人"  
109 - // this.self_id = data.items[i].id  
110 - // }else{  
111 - // data.items[i].relative = data.items[i].family_ties  
112 - // }  
113 datalist.push(data.items[i]) 112 datalist.push(data.items[i])
114 } 113 }
115 this.setData({ 114 this.setData({
116 taxlist: datalist 115 taxlist: datalist
117 }) 116 })
118 - this.getStatus(datalist)  
119 } 117 }
120 console.log('handleData', this.data.taxlist) 118 console.log('handleData', this.data.taxlist)
121 }, 119 },
@@ -138,15 +136,6 @@ Page({ @@ -138,15 +136,6 @@ Page({
138 } 136 }
139 }, 137 },
140 138
141 - getStatus: function (data) {  
142 - console.log('data', data)  
143 - if (data[0].family_ties.length < 1 || data[0].name.length < 1 || data[0].id_card_type.length < 1 || data[0].id_card_no.length <1 || data[0].mobile.length < 1) {  
144 - this.setData({  
145 - text_tip: '自然人信息不完善,立即完善'  
146 - })  
147 - }  
148 - },  
149 -  
150 goadd: function (e) { 139 goadd: function (e) {
151 console.log(e) 140 console.log(e)
152 wx.navigateTo({ 141 wx.navigateTo({
@@ -105,6 +105,8 @@ @@ -105,6 +105,8 @@
105 height: 40rpx; 105 height: 40rpx;
106 float: right; 106 float: right;
107 vertical-align: center; 107 vertical-align: center;
  108 + margin-top:20rpx;
  109 +
108 } 110 }
109 111
110 .phone_image_wrap { 112 .phone_image_wrap {
注册登录 后发表评论