zoukankan      html  css  js  c++  java
  • mui ajax传参示例

    //加入购物车
    var data=[];
    var row1 = {good_id:'1',number:'2',goods_spec_ids:[1,2]};
    data.push(row1);
    console.log(JSON.stringify(data));
    //加入订单
    var data=[];
    var row1 = {good_id:'1',number:'1',goods_spec_ids:[1,2],address_id:'13'};
    var row2 = {good_id:'2',number:'3',goods_spec_ids:[3,4],address_id:'13'};
    data.push(row1);
    data.push(row2);
    //http://test.dailingmei.com/wechat/Pay_order/index?orderids=1,6
    //'data':JSON.stringify(data)
    //价格计算
    /*var data=[];
    var row1 = {cart_desc_id:'30',number:'1'};
    var row2 = {cart_desc_id:'29',number:'3'};
    data.push(row1);
    data.push(row2);
    //'data':JSON.stringify(data)
    //加入订单
    var data=[];
    var row1 = {cart_desc_id:'30',number:'1',address_id:'13'};
    var row2 = {cart_desc_id:'29',number:'3',address_id:'13'};
    data.push(row1);
    data.push(row2);*/
    //'data':JSON.stringify(data)
    var data=[];
    var row1 = {good_id:'1',number:'2',goods_spec_ids:[1,2]};
    data.push(row1);
    //console.log(JSON.stringify(data));
    mui.ajax('/api/Cart/addCartDesc', {
    data: {
    'type':0,
    'page':1,
    'size':1,
    'examine':'1',
    'status':[1,2],
    'tag_id':5,
    'good_id':1,
    'data':JSON.stringify(data)
    },
    dataType: 'json',
    type: 'post',
    async: false,
    headers: {'Content-Type': 'application/json'},
    success: function (jsondata) {
    console.log(jsondata);
    },
    });
  • 相关阅读:
    XML案例
    4.6Java数组的遍历
    4.3Java多态(polymorphism)
    XML文档的标准
    4.6Java数组的定义
    4.6Java数组初始化的方式
    XML介绍
    4.6Java对象转型(casting)
    HelloWorld之MyBatis
    Hibernate查询方法比较
  • 原文地址:https://www.cnblogs.com/daochong/p/10077428.html
Copyright © 2011-2022 走看看