commonService.js 793 Bytes
/**
 * commonService.js
 *@author dennis
 *@createtime 2018/11/16
 *@description 上传formid
 */
import BaseService from "../../../libs/services/baseService";
import { MINI_APP_TYPE} from '../../../libs/config';
import config from '../../../config'

export  default class commonService extends BaseService {

  constructor(props) {
    super(props)
    this.url =  config.domains.yohoApi;
  }

  addWechatFormId(data, complete) {

    data.method = 'wechat.formId.add'
    data.miniapp_type = MINI_APP_TYPE
    let openId =  wx.getStorageSync( "openid")
    data.openId = openId || ''
    this.GET(
      {
        ...data,
      },
      {
        complete
      }
    ).then(result => {
        console.log(result)
    })
      .catch(error => {
        console.log(error)
      })
  }

}