跟踪了一天的代码,最终找到了问题:
 
注意在开发工具中跟踪data对象中每个变量的值,最开始是将customize_name2....写成了对象,而不是取input的值,造成的问题。
$axios 传递object Converting circular structure to JSON

 

以下为正确写法:
<Input size="large" v-model="customize_name2" name="customize_name2" placeholder="请填写手机号" class="input_style" />

 

 

 
var data = { 
              trace_code:sessionStorage.getItem("code"),
              customer_id:sessionStorage.getItem("customerId"),
              code:sessionStorage.getItem("code"),
              customize_name2:t.customize_name2,
              customize_name1:t.customize_name1,
              customize_name3:t.customize_name3
              };

        t.$axios.get(baseUrl + "/index/user/collect_info",{
        params:data
        })
        .then(function (s) {
            console.log(s)
            debugger
            //t.modal_loading = false;
            // 200 == s.data.code
            //   ? ((t.collection = !t.collection), t.join())
            //   : t.$Toast(s.data.msg);
            if(200 == s.data.code){
              t.collection=false
              t.handleStatus()//重新抽奖
            }
          })
        .catch(function (err) {
          //t.$Toast("网络异常");
          console.log(err)
        });

相关文章:

  • 2021-11-06
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2021-11-01
  • 2021-05-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-28
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
相关资源
相似解决方案