import http from "@/http/http.js";
// let baseUrl = "/api/web/action/tmOrder/springBoard";
// let baseUrl1 = "/api/web/action/product/springBoard";

let baseURL = "";
if (process.env.NODE_ENV == 'development') {//开发环境
  baseURL = '/api/web/action/tmOrder/springBoard';
} else if (process.env.NODE_ENV == 'production') {//生产环境
  baseURL = '/web/action/tmOrder/springBoard';
}

let baseURL1 = "";
if (process.env.NODE_ENV == 'development') {//开发环境
  baseURL1 = '/api/web/action/product/springBoard';
} else if (process.env.NODE_ENV == 'production') {//生产环境
  baseURL1 = '/web/action/product/springBoard';
}

// 获取jdtrademark商标注册申请类型：自主/专家辅助/担保 卡片信息
// 产品列表-根据产品二类获取 7.1.2
export function getProductListCards() {
  return http.post(baseURL1, {
    actionBody: {
      pathCode: "sbfu"
    },
    actionType: "getProductList",
  });
}

// 产品详情:点击首页的 专家辅助申请 和 担保申请-进入相应的专家辅助申请 和 担保申请产品详情页面
// 产品详情-应用中心
export function getProductDetail(channelitemcode) {
  return http.post(baseURL, {
    actionBody: {
      // 自助: FW_GOODS-581976-1
      //   辅助：FW_GOODS-580010-1
      // 担保：FW_GOODS-581978-1
      channelItemCode: channelitemcode
    },
    actionType: "getCAProductDetail",
    actionProcess: "bw"
  });
}

// 自主提报商标注册方式的获取订单编号
// 商标提报
export function submitSelfregTmOrder(channelitemcode) {
  return http.post(baseURL, {
    actionBody: {
      itemCode: "zzsbzc",
      channelParams: {},
      channelUser: {
        channelUserId: "z1203155540315474420",
        channelUserName: "testUser",
        channelUserMoblie: "15010929368",
        nickname: "",
        orgName: "",
        orgPath: ""
      },
      channelOrder: {
        channelServiceNo: "z1203155540315474420",
        channelOrderNo: "z12031,z1203d1",
        needNo: "z120303d1",
        quantity: 1,
        nclCount: 10,
        payStatus: "yfk",
        payTime: "2019-09-11 10:23:21"
      },
      apply: {
        applyAddr: "上海市杨浦区国定路346号三楼0624室",
        applyArea: "",
        businessLicensePic:
          "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_yyzz120315554031547442019316.jpg",
        businessLicensePdf:
          "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_yyzz120315554031547442019316.pdf",
        code: "91310110398635929J",
        contacts: "宋毅",
        customerType: "ent",
        email: "songyi@gongsibao.com",
        fax: "",
        identityCardNo: "",
        identityCardPic: "",
        identityCardPdf: "",
        mobile: "15010929368",
        name: "上海辰者信息科技有限公司",
        notes: "订单备注信息",
        gzwtsUrl:
          "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_wts863215710393842862019914.jpg",
        smwjUrl: "",
        zipCode: "100000"
      },
      tm: {
        colorizedPicUrl:
          "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_word2picb2bc98b9fc564ef2a1f4b3cbe9352f39.jpg",
        tmName: "testbiao",
        picUrl:
          "https://gsb-zc.oss-cn-beijing.aliyuncs.com/zc_word2picb2bc98b9fc564ef2a1f4b3cbe9352f39.jpg",
        selecttype: "自主选择",
        tmFormType: "3",
        totalPublicExpense: 270,
        totalServiceCharge: 0,
        totalSum: 270,
        totalTaxes: "0.00"
      },
      nclones: [
        {
          code: "02",
          name: "颜料油漆",
          nclThree: [
            {
              code: "020008",
              disabled: false,
              fullname: "020008 绘画用铝粉",
              name: "绘画用铝粉",
              pcode: "0202"
            },
            {
              code: "020005",
              disabled: false,
              fullname: "020005 食品用着色剂",
              name: "食品用着色剂",
              pcode: "0203"
            }
          ]
        }
      ]
    },
    actionType: "subTmOrder",
    actionProcess: "bw"
  });
}
