Showing
1 changed file
with
30 additions
and
29 deletions
| @@ -117,39 +117,40 @@ | @@ -117,39 +117,40 @@ | ||
| 117 | var classs = $('.layui-anim').find('i').attr('class'); | 117 | var classs = $('.layui-anim').find('i').attr('class'); |
| 118 | console.log(classs); | 118 | console.log(classs); |
| 119 | var id = $(this).find('input:checked').attr('id'); | 119 | var id = $(this).find('input:checked').attr('id'); |
| 120 | - if(id==1 && classs!='layui-anim layui-icon'){ | 120 | + if(id==1){ |
| 121 | + if(classs!='layui-anim layui-icon'){ | ||
| 122 | + //请求数据 | ||
| 123 | + $.ajax({ | ||
| 124 | + url: "{:url('get_seller_config_mode')}", | ||
| 125 | + type: 'post', | ||
| 126 | + cache: false, | ||
| 127 | + data:{index:i,sid:sid}, | ||
| 128 | + success: function (res) { | ||
| 129 | + if (res.code==1) { | ||
| 130 | + $("#device_call_lite").show(); | ||
| 131 | + var html = ''; | ||
| 132 | + var is_checked_call = res.list.is_checked_call==1 ? 'checked' : ''; | ||
| 133 | + if(res.list.user_info){ | ||
| 134 | + var title = 'title = 公众号+小程序+语音电话('+res.list.user_info.nick_name+'+'+res.list.user_info.phone+'+'+res.list.user_info.is_openid_wechat_str+')'; | ||
| 135 | + var is_openid_wechat = (res.list.user_info.is_openid_wechat !=1 || res.list.user_info.phone_status==1) ? 'disabled' : ''; | ||
| 136 | + }else{ | ||
| 137 | + var title = 'title = 公众号+小程序+语音电话'; | ||
| 138 | + } | ||
| 121 | 139 | ||
| 122 | - //请求数据 | ||
| 123 | - $.ajax({ | ||
| 124 | - url: "{:url('get_seller_config_mode')}", | ||
| 125 | - type: 'post', | ||
| 126 | - cache: false, | ||
| 127 | - data:{index:i,sid:sid}, | ||
| 128 | - success: function (res) { | ||
| 129 | - if (res.code==1) { | ||
| 130 | - $("#device_call_lite").show(); | ||
| 131 | - var html = ''; | ||
| 132 | - var is_checked_call = res.list.is_checked_call==1 ? 'checked' : ''; | ||
| 133 | - if(res.list.user_info){ | ||
| 134 | - var title = 'title = 公众号+小程序+语音电话('+res.list.user_info.nick_name+'+'+res.list.user_info.phone+'+'+res.list.user_info.is_openid_wechat_str+')'; | ||
| 135 | - var is_openid_wechat = (res.list.user_info.is_openid_wechat !=1 || res.list.user_info.phone_status==1) ? 'disabled' : ''; | 140 | + var is_checked_lite = res.list.is_checked_lite==1 ? 'checked' : ''; |
| 141 | + html +='<input type="checkbox" class="device_check" lay-filter="device_check" name="is_checked_call" lay-skin="primary" title="电话机+APP" '+is_checked_call+'> <input type="checkbox" class="device_check" lay-filter="device_check" name="is_checked_lite" lay-skin="primary" '+title+' '+is_checked_lite+' '+is_openid_wechat+'>'; | ||
| 142 | + $("#device_call_lite").html(html); | ||
| 143 | + $("#device_call_lite").show(); | ||
| 136 | }else{ | 144 | }else{ |
| 137 | - var title = 'title = 公众号+小程序+语音电话'; | 145 | + layer.msg(res.msgs,{icon:5}); |
| 146 | + return false; | ||
| 138 | } | 147 | } |
| 139 | - | ||
| 140 | - var is_checked_lite = res.list.is_checked_lite==1 ? 'checked' : ''; | ||
| 141 | - html +='<input type="checkbox" class="device_check" lay-filter="device_check" name="is_checked_call" lay-skin="primary" title="电话机+APP" '+is_checked_call+'> <input type="checkbox" class="device_check" lay-filter="device_check" name="is_checked_lite" lay-skin="primary" '+title+' '+is_checked_lite+' '+is_openid_wechat+'>'; | ||
| 142 | - $("#device_call_lite").html(html); | ||
| 143 | - $("#device_call_lite").show(); | ||
| 144 | - }else{ | ||
| 145 | - layer.msg(res.msgs,{icon:5}); | ||
| 146 | - return false; | 148 | + form.render(); |
| 149 | + }, | ||
| 150 | + error: function (result) { | ||
| 147 | } | 151 | } |
| 148 | - form.render(); | ||
| 149 | - }, | ||
| 150 | - error: function (result) { | ||
| 151 | - } | ||
| 152 | - }); | 152 | + }); |
| 153 | + } | ||
| 153 | $("#device_call_lite").show(); | 154 | $("#device_call_lite").show(); |
| 154 | }else{ | 155 | }else{ |
| 155 | $("#device_call_lite").hide(); | 156 | $("#device_call_lite").hide(); |
-
Please register or login to post a comment