12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- (function () {
- var page = {
- isScroll: true,
- init: function ($page) {
- $page.find('#select3').lrpicker({
- placeholder: '请选择(必填)',
- data: cityData,
- level: 3
- });
- var cityid = 10;
- renlian.http.get("http://czapp.rltest.cn/?s=api/get_insure_info&cityid="+cityid,{}, function (res) {
- if (res) {
- var insuredata = [];
- $.each(res.data, function (_index, _item) {
- //console.log(_item);
- insuredata.push({value:_index,text:_item.InsuranceName});
- $page.find('#checkbox1').lrcheckbox({
- data:insuredata
- });
- });
- }
- });
-
- /*var $this = $(this);
- var html = '';
- var insure_info = '{"0":{"data":"人车险","price":"100元"},"1":{"data":"被盗险","price":"110元"}}'
- if(insure_info){
- insureinfo = JSON.parse(insure_info);
- $.each(insureinfo, function (_index, _item) {
- html += '<button type="button" class="lr-btn lr-btn-block">'+ _item.data +'</button>';
- });
- html += '<button type="button" class="lr-btn-primary lr-btn-block">立即支付</button>\
- <button type="button" class="lr-btn-primary lr-btn-block">查看订单</button>';
- $page.find('#insure-button').append(html);
- $('.lr-btn-block').on('click',function () {
- $(".lr-btn-block").attr("lr-btn","lr-btn-primary");
- });
- }else{
- html += '<h4>暂无保险</h4>'
- $page.find('#insure-button').append(html);
- }*/
- var html = '';
- html += '<button type="button" class="lr-btn-primary lr-btn-block">立即支付</button>\
- <button type="button" class="lr-btn-primary lr-btn-block">查看订单</button>';
- $page.find('#insure-button').append(html);
- $('.lr-btn-block').on('click',function () {
- $(".lr-btn-block").attr("lr-btn","lr-btn-primary");
- });
- }
- };
- return page;
- })();
|