Commit c2834e7e by 王昆

gsb

parent cb045b5f
var system = require("../../system")
const md5 = require("MD5");
const logCtl = system.getObject("web.oplogCtl");
const moment = require("moment");
class EcompanyApi {
constructor() {
this.ecompanySve = system.getObject("service.ecompanySve");
}
async merchantNameSuggest(queryobj, qobj, req) {
var name = this.trim(queryobj.name);
if(!name) {
return system.getResult2([])
}
var list = await this.ecompanySve.suggest(name);
return system.getResult2(list);
}
trim(o) {
if (!o) {
return "";
}
return o.toString().trim();
}
}
module.exports = EcompanyApi;
\ No newline at end of file
var system = require("../../system")
var settings = require("../../../config/settings");
const CtlBase = require("../ctl.base");
class ChannelCtl extends CtlBase {
constructor() {
super(CtlBase.getServiceName(ChannelCtl));
}
// 来源
async originDics(queryobj, obj, req) {
try {
let rs = await this.service.originDics(obj);
return rs;
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async originInfo(queryobj, obj, req) {
try {
return await this.service.originInfo(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async originMerchants(queryobj, obj, req) {
try {
return await this.service.originMerchants(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
// 渠道
async channelSuggest(queryobj, obj, req) {
try {
return await this.service.channelSuggest(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async channelDicts(queryobj, obj, req) {
try {
return await this.service.channelDicts(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async channelInfo(queryobj, obj, req) {
try {
return await this.service.channelInfo(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async channelSave(queryobj, obj, req) {
try {
return await this.service.channelSave(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async channelPage(queryobj, obj, req) {
try {
return await this.service.channelPage(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
// 商户
async merchantInfo(queryobj, obj, req) {
try {
return await this.service.merchantInfo(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async merchantSave(queryobj, obj, req) {
try {
return await this.service.merchantSave(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
async merchantPage(queryobj, obj, req) {
try {
return await this.service.merchantPage(obj);
} catch (e) {
console.log(e);
return system.getResultFail(500, "接口错误");
}
}
}
module.exports = ChannelCtl;
\ No newline at end of file
...@@ -134,7 +134,7 @@ class EcompanyDao extends Dao { ...@@ -134,7 +134,7 @@ class EcompanyDao extends Dao {
if(ownerIds && ownerIds.length > 0) { if(ownerIds && ownerIds.length > 0) {
sql = sql + " AND owner_id IN (:ownerIds) "; sql = sql + " AND owner_id IN (:ownerIds) ";
} }
sql = sql + " ORDER BY id ASC "; sql = sql + " ORDER BY id ASC LIMIT 10";
var list = await this.customQuery(sql, {queryLike: "%" + name + "%", ownerIds: ownerIds}); var list = await this.customQuery(sql, {queryLike: "%" + name + "%", ownerIds: ownerIds});
return list || []; return list || [];
} }
......
...@@ -47,6 +47,15 @@ module.exports = { ...@@ -47,6 +47,15 @@ module.exports = {
"bizConfig": null, "bizConfig": null,
"path": "" "path": ""
}, },
{
"code": "apidebug",
"label": "api",
"isMenu": true,
"bizCode": "apidebug",
"bizConfig": null,
"path": ""
},
] ]
} }
], ],
...@@ -1462,6 +1471,7 @@ module.exports = { ...@@ -1462,6 +1471,7 @@ module.exports = {
"roles": {"title": "角色管理", "config": null, "path": "/roles", "comname": "roles"}, "roles": {"title": "角色管理", "config": null, "path": "/roles", "comname": "roles"},
"cachearches": {"title": "缓存管理", "config": null, "path": "/cachearches", "comname": "cachearches"}, "cachearches": {"title": "缓存管理", "config": null, "path": "/cachearches", "comname": "cachearches"},
"tasks": { "title": "平台任务", "config": null, "path": "/tasks", "comname": "tasks" }, "tasks": { "title": "平台任务", "config": null, "path": "/tasks", "comname": "tasks" },
"apidebug": { "title": "平台任务", "config": null, "path": "/apidebug", "comname": "apidebug" },
"dkaggreement": {"title": "协议管理", "config": null, "path": "/dkaggreement", "comname": "dkaggreement"}, "dkaggreement": {"title": "协议管理", "config": null, "path": "/dkaggreement", "comname": "dkaggreement"},
......
module.exports={
"bizName":"usercenter",
"list":{
columnMetaData:[
]
},
"form":[
],
"search":[
],
"auth":{
"add":[
],
"edit":[
],
"delete":[
],
"common":[
],
}
}
\ No newline at end of file
var system = require("../../system");
var settings = require("../../../config/settings");
const microService = require("../svems.base");
// 渠道服务
class ChannelService extends microService {
constructor() {
super();
this.restClient = system.getObject("util.restClient");
this.ossClient = system.getObject("util.ossClient");
}
// 来源api
async originDics(params) {
return await this.callms("channel", "originDics", params);
}
async originInfo(params) {
return await this.callms("channel", "originInfo", params);
}
async originMerchants(params) {
return await this.callms("channel", "originMerchants", params);
}
// 渠道api
async channelSuggest(params) {
return await this.callms("channel", "channelSuggest", params);
}
async channelDicts(params) {
return await this.callms("channel", "channelDicts", params);
}
async channelInfo(params) {
return await this.callms("channel", "channelInfo", params);
}
async channelSave(params) {
return await this.callms("channel", "channelSave", params);
}
async channelPage(params) {
return await this.callms("channel", "channelPage", params);
}
// 商户api
async merchantInfo(params) {
return await this.callms("channel", "merchantInfo", params);
}
async merchantSave(params) {
return await this.callms("channel", "merchantSave", params);
}
async merchantPage(params) {
return await this.callms("channel", "merchantPage", params);
}
}
module.exports = ChannelService;
\ No newline at end of file
const system=require("../system"); const system = require("../system");
const settings=require("../../config/settings"); const settings = require("../../config/settings");
const moment = require("moment"); const moment = require("moment");
class ServiceBase{ class ServiceBase {
constructor(daoName){ constructor(daoName) {
//this.dbf=system.getObject("db.connection"); //this.dbf=system.getObject("db.connection");
this.db=system.getObject("db.connection").getCon(); this.db = system.getObject("db.connection").getCon();
this.cacheManager=system.getObject("db.cacheManager"); this.cacheManager = system.getObject("db.cacheManager");
this.daoName=daoName; this.daoName = daoName;
this.dao=system.getObject("db."+daoName); this.dao = system.getObject("db." + daoName);
this.md5=require("MD5"); this.md5 = require("MD5");
}
static getDaoName(ClassObj){ this.micro = system.microsetting();
return ClassObj["name"].substring(0,ClassObj["name"].lastIndexOf("Service")).toLowerCase()+"Dao"; }
} static getDaoName(ClassObj) {
async findAll(obj){ return ClassObj["name"].substring(0, ClassObj["name"].lastIndexOf("Service")).toLowerCase() + "Dao";
const objs=await this.dao.model.findAll(); }
async findAll(obj) {
const objs = await this.dao.model.findAll();
return objs; return objs;
}
async findAndCountAll(obj){
const apps=await this.dao.findAndCountAll(obj);
return apps;
} }
async refQuery(qobj){ async findAndCountAll(obj) {
const apps = await this.dao.findAndCountAll(obj);
return apps;
}
async refQuery(qobj) {
return this.dao.refQuery(qobj); return this.dao.refQuery(qobj);
} }
async bulkDelete(ids){ async bulkDelete(ids) {
var en= await this.dao.bulkDelete(ids); var en = await this.dao.bulkDelete(ids);
return en; return en;
} }
async delete(qobj){ async delete(qobj) {
return this.dao.delete(qobj); return this.dao.delete(qobj);
} }
async create(qobj){ async create(qobj) {
return this.dao.create(qobj); return this.dao.create(qobj);
} }
async update(qobj,tm=null){ async update(qobj, tm = null) {
return this.dao.update(qobj,tm); return this.dao.update(qobj, tm);
} }
async updateByWhere(setObj,whereObj,t){ async updateByWhere(setObj, whereObj, t) {
return this.dao.updateByWhere(setObj,whereObj,t); return this.dao.updateByWhere(setObj, whereObj, t);
} }
async customExecAddOrPutSql(sql,paras=null){ async customExecAddOrPutSql(sql, paras = null) {
return this.dao.customExecAddOrPutSql(sql,paras); return this.dao.customExecAddOrPutSql(sql, paras);
} }
async customQuery(sql,paras,t){ async customQuery(sql, paras, t) {
return this.dao.customQuery(sql,paras,t); return this.dao.customQuery(sql, paras, t);
} }
async findCount(whereObj=null){ async findCount(whereObj = null) {
return this.dao.findCount(whereObj); return this.dao.findCount(whereObj);
} }
async findSum(fieldName,whereObj=null){ async findSum(fieldName, whereObj = null) {
return this.dao.findSum(fieldName,whereObj); return this.dao.findSum(fieldName, whereObj);
} }
async getPageList(pageIndex,pageSize,whereObj=null,orderObj=null,attributesObj=null,includeObj=null){ async getPageList(pageIndex, pageSize, whereObj = null, orderObj = null, attributesObj = null, includeObj = null) {
return this.dao.getPageList(pageIndex,pageSize,whereObj,orderObj,attributesObj,includeObj); return this.dao.getPageList(pageIndex, pageSize, whereObj, orderObj, attributesObj, includeObj);
} }
async findOne(obj){ async findOne(obj) {
return this.dao.findOne(obj); return this.dao.findOne(obj);
} }
async findById(oid){ async findById(oid) {
return this.dao.findById(oid); return this.dao.findById(oid);
} }
/**
* 请求微服务
* @param {*} sveName 服务名称
* @param {*} apiName api名称
* @param {*} params 参数
*/
async callms(sveName, apiName, params) {
var reqUrl = this.micro[sveName];
console.log(reqUrl, "-----------------------------");
if (!reqUrl) {
return system.getResult(null, "未找到【" + sveName + "】服务,请检查settings文件是否存在");
}
if (!apiName) {
return system.getResult(null, "apiName不能为空");
}
try {
var params = {
"action_process": "bpo-admin",
"action_type": apiName,
"action_body": params || {},
}
if (settings.env == 'dev') {
let rs = await axios({
method: 'post',
url: reqUrl,
data: params
});
console.log(rs);
return rs.data;
}
var rs = await this.restClient.execPost(params, reqUrl);
if (rs && rs.stdout) {
return JSON.parse(rs.stdout);
}
return system.getResult(null, rs);
} catch (error) {
console.log(error);
this.logCtl.error({
optitle: "微服务请求失败",
op: "sveName = " + sveName + "; apiName = " + apiName,
content: "params = " + JSON.stringify(params),
clientIp: ""
});
return system.getResult(null, error.message);
}
}
async getUidInfo(len, radix) { async getUidInfo(len, radix) {
    var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');//长度62,到yz长度为长36 var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');//长度62,到yz长度为长36
    var uuid = [], i; var uuid = [], i;
    radix = radix || chars.length; radix = radix || chars.length;
    if (len) { if (len) {
      for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random()*radix]; for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
    } else { } else {
      var r; var r;
      uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'; uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
      uuid[14] = '4'; uuid[14] = '4';
      for (i = 0; i < 36; i++) { for (i = 0; i < 36; i++) {
        if (!uuid[i]) { if (!uuid[i]) {
          r = 0 | Math.random()*16; r = 0 | Math.random() * 16;
          uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r]; uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
        } }
      } }
    } }
    return uuid.join(''); return uuid.join('');
} }
encryptPasswd(passwd) { encryptPasswd(passwd) {
if(!passwd) { if (!passwd) {
throw new Error("请输入密码"); throw new Error("请输入密码");
} }
var md5 = this.md5(passwd + "_" + settings.salt); var md5 = this.md5(passwd + "_" + settings.salt);
return md5.toString().toLowerCase(); return md5.toString().toLowerCase();
} }
handleDate(row, fields, pattern, addHours) { handleDate(row, fields, pattern, addHours) {
pattern = pattern || "YYYY-MM-DD HH:mm"; pattern = pattern || "YYYY-MM-DD HH:mm";
...@@ -95,18 +147,18 @@ class ServiceBase{ ...@@ -95,18 +147,18 @@ class ServiceBase{
} }
for (var field of fields) { for (var field of fields) {
if (row[field]) { if (row[field]) {
if(addHours) { if (addHours) {
row[field] = moment(row[field]).add(addHours,"hours").format(pattern); row[field] = moment(row[field]).add(addHours, "hours").format(pattern);
} else { } else {
row[field] = moment(row[field]).format(pattern); row[field] = moment(row[field]).format(pattern);
} }
} }
} }
} }
addWhereTime(where, field, begin, end) { addWhereTime(where, field, begin, end) {
if(!begin && !end) { if (!begin && !end) {
return; return;
} }
...@@ -126,10 +178,10 @@ class ServiceBase{ ...@@ -126,10 +178,10 @@ class ServiceBase{
} }
trim(o) { trim(o) {
if(!o) { if (!o) {
return ""; return "";
} }
return o.toString().trim(); return o.toString().trim();
} }
} }
module.exports=ServiceBase; module.exports = ServiceBase;
const system = require("../system");
const settings = require("../../config/settings");
const moment = require("moment");
const axios = require("axios");
class ServiceBase {
constructor(daoName) {
this.md5 = require("MD5");
this.micro = system.microsetting();
}
/**
* 请求微服务
* @param {*} sveName 服务名称
* @param {*} apiName api名称
* @param {*} params 参数
*/
async callms(sveName, apiName, params) {
var reqUrl = this.micro[sveName];
console.log(reqUrl, "-----------------------------");
if (!reqUrl) {
return system.getResult(null, "未找到【" + sveName + "】服务,请检查settings文件是否存在");
}
if (!apiName) {
return system.getResult(null, "apiName不能为空");
}
try {
var params = {
"action_process": "bpo-admin",
"action_type": apiName,
"action_body": params || {},
}
if (settings.env == 'dev') {
let rs = await axios({
method: 'post',
url: reqUrl,
data: params
});
console.log(rs);
return rs.data;
}
var rs = await this.restClient.execPost(params, reqUrl);
if (rs && rs.stdout) {
return JSON.parse(rs.stdout);
}
return system.getResult(null, rs);
} catch (error) {
console.log(error);
this.logCtl.error({
optitle: "微服务请求失败",
op: "sveName = " + sveName + "; apiName = " + apiName,
content: "params = " + JSON.stringify(params),
clientIp: ""
});
return system.getResult(null, error.message);
}
}
async getUidInfo(len, radix) {
var chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');//长度62,到yz长度为长36
var uuid = [], i;
radix = radix || chars.length;
if (len) {
for (i = 0; i < len; i++) uuid[i] = chars[0 | Math.random() * radix];
} else {
var r;
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
uuid[14] = '4';
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | Math.random() * 16;
uuid[i] = chars[(i == 19) ? (r & 0x3) | 0x8 : r];
}
}
}
return uuid.join('');
}
encryptPasswd(passwd) {
if (!passwd) {
throw new Error("请输入密码");
}
var md5 = this.md5(passwd + "_" + settings.salt);
return md5.toString().toLowerCase();
}
handleDate(row, fields, pattern, addHours) {
pattern = pattern || "YYYY-MM-DD HH:mm";
if (!row) {
return;
}
for (var field of fields) {
if (row[field]) {
if (addHours) {
row[field] = moment(row[field]).add(addHours, "hours").format(pattern);
} else {
row[field] = moment(row[field]).format(pattern);
}
}
}
}
addWhereTime(where, field, begin, end) {
if (!begin && !end) {
return;
}
if (begin && end) {
where[field] = {
[this.db.Op.between]: [begin, end]
};
} else if (begin && !end) {
where[field] = {
[this.db.Op.gte]: begin
};
} else if (!begin && end) {
where[field] = {
[this.db.Op.lte]: end
};
}
}
trim(o) {
if (!o) {
return "";
}
return o.toString().trim();
}
}
module.exports = ServiceBase;
...@@ -252,6 +252,25 @@ class System { ...@@ -252,6 +252,25 @@ class System {
// return p; // return p;
// } // }
// } // }
static microsetting() {
console.log(settings.env, "-------------- microsetting env ------------------");
var path = "/api/op/action/springboard";
if (settings.env == "dev") {
// var domain = "http://192.168.18.237";
var domain2 = "http://127.0.0.1";
var domain = "http://39.107.234.14";
return {
// 渠道服务
channel: domain + ":3003" + path,
}
} else {
// var odomain = "http://123.57.217.203"
return {
channel: "bpochannel-service" + path,
}
}
}
} }
Date.prototype.Format = function(fmt) Date.prototype.Format = function(fmt)
{ //author: meizz { //author: meizz
......
<gsb-pcpage>
<div>
<div style="height: auto;">
<el-card style="background-color: #FFFFFF;min-height: 700px;">
<div style="line-height: 15px;padding-bottom:40px;padding: 9px 0px 0px 9px;">
<div style="width:2px;height:15px;float: left;background-color: #54C4A7">
</div>
<span style="font-size:16px;float: left;font-weight:bold;margin-left: 7px;color: #333333">ctl调试</span>
</div>
<div style="clear:both; padding: 0px 0px 0px 23px;">
<el-form :model="apiForm" ref="apiForm" label-position="left" label-width="100px" style="padding:0px 65px;" >
<el-form-item label="api" prop="uri" >
<el-input v-model="apiForm.uri" placeholder="api路径" style="width:550px;" clearable ></el-input>
</el-form-item>
<el-form-item label="请求参数" prop="req" >
<el-input v-model="apiForm.req" type="textarea" :autosize="{ minRows: 8, maxRows: 20}" style="width:550px;" clearable ></el-input>
</el-form-item>
<el-form-item label="返回结果" prop="res" >
<el-input v-model="apiForm.res" type="textarea" :autosize="{ minRows: 10, maxRows: 20}" style="width:550px;" clearable ></el-input>
</el-form-item>
<div style="width: 100%;text-align: center;">
<el-button type="primary" @click="doreq()">请求</el-button>
<el-button @click="cleareq()">重置</el-button>
</div>
</el-form>
</div>
</div>
</div>
<el-dialog width="524px" :visible.sync="dialogFormVisible">
<div slot="title">
<span style="margin-left:9px;margin-top:-3px;;width:72px; height:25px; font-size:18px; font-family:PingFangSC-Regular; font-weight:400; color:rgba(51,51,51,1); line-height:25px;">
修改密码
</span>
<div style="width: 524px; height: 1px;background-color: #E3E3E3;margin: 17px 20px 0px -20px"></div>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取 消</el-button>
<el-button type="primary" @click="save()">保存修改</el-button>
</div>
</el-dialog>
</gsb-pcpage>
\ No newline at end of file
{
template: '${tmpl}',
data: function() {
return {
currentUser: null,
dialogTableVisible: false,
dialogFormVisible: false,
pwdSaveLoading: false,
apiForm: {
uri: '',
req: '',
res: ''
},
}
},
mounted: function() {
},
created: function() {
},
methods: {
cleareq() {
this.apiForm = {
uri: '',
req: '',
res: ''
};
},
doreq() {
console.log(this.apiForm, '-------------- api form');
var self = this;
let data = JSON.parse(self.apiForm.req || "{}");
self.$root.postReq(self.apiForm.uri, data).then(function (d) {
self.apiForm.res = JSON.stringify(d);
});
}
},
vname: "gsb-bpouser"
}
渠道服务接口
1 来源
1.1. 商户来源字典
url: /web/channelCtl/originDics
请求参数:
{}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"data": [{
"id": 10000, // 字典id
"name": "薪必果结算", // 字典名称
"is_api": 1 // 0不需要请求api,1需要请求接口(1.2 商户来源企业suggest)获取来源商户列表
}],
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
1.2 商户来源企业suggest
url: /web/channelCtl/originMerchants
请求参数:
{
"id": 10000, // 来源id
"name" : "xxx", // 商户搜索名称
}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"data": [{
"id": 10000, // 商户id
"name": "北京国美融通科技有限公司", // 商户名称
}],
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
2 渠道管理
2.1 渠道字典
url: /web/channelCtl/channelDicts
请求参数:
{}
返回结果:
{
"status": 0,
"msg": "success",
"data": [{
"id": 10000, // 渠道id
"name": "测试1" // 渠道名称
}],
"requestid": "8e6da5a710cc43e0a11d426ae84a5780"
}
2.2 渠道搜索
url: /web/channelCtl/channelSuggest
请求参数:
{
"name":"测试3333" // 渠道名称
}
返回结果:
{
"status": 0,
"msg": "success",
"data": [{
"id": 10000, // 渠道id
"name": "测试1" // 渠道名称
}],
"requestid": "8e6da5a710cc43e0a11d426ae84a5780"
}
2.3 渠道管理列表
url: /web/channelCtl/channelPage
请求参数:
{
"currentPage":1,
"pageSize": 2,
"name":"测试1" // 渠道名称
}
返回结果:
{
"status": 0,
"msg": "success",
"data": {
"count": 1,
"rows": [{
"id": 10000,
"ctype": 1, // 1机构 2个人
"name": "测试1",
"idcode": "统一社会信用代码or身份证",
"business_license": "营业执照图片路径",
"idcard_front": "身份证正面图",
"idcard_back": "身份证反面图",
"contact_man": "联系人",
"contact_mobile": "联系电话",
"contact_email": "联系偶像",
"contact_addr": "联系地址",
"created_at": "2020-03-06 05:38:49",
}]
},
"requestid": "d3fde2b829244c20966031d8e7f93e2a"
}
2.4 渠道信息
url: /web/channelCtl/channelInfo
请求参数:
{
"id":"10002"
}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"data": {
"id": 10000,
"ctype": 1, // 1机构 2个人
"name": "测试1",
"idcode": "统一社会信用代码or身份证",
"business_license": "营业执照图片路径",
"idcard_front": "身份证正面图",
"idcard_back": "身份证反面图",
"contact_man": "联系人",
"contact_mobile": "联系电话",
"contact_email": "联系偶像",
"contact_addr": "联系地址",
"created_at": "2020-03-06 05:38:49",
},
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
2.3 渠道保存
url: /web/channelCtl/channelSave
请求参数:
{
"id":"10002", // id 为空时新增 不为空时修改
"ctype":"1",
"name":"测试3333",
"idcode":"统一社会信用代码or身份证",
"business_license":"营业执照图片路径",
"idcard_front":"身份证正面图",
"idcard_back":"身份证反面图",
"contact_man":"联系人",
"contact_mobile":"联系电话",
"contact_email":"联系偶像",
"contact_addr":"联系地址"
}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
3 商户管理
3.1 商户管理列表
url: /web/channelCtl/merchantPage
请求参数:
{
"currentPage":1,
"pageSize": 2,
"channel_id":10000 // 渠道id,
"origin_id":10000 // 渠道id,
"merchant_name":"商户名称" // 渠道id,
}
返回结果:
{
"status": 0,
"msg": "success",
"data": {
"count": 6,
"rows": [{
"id": 7, // 商户id
"channel_id": 10002, // 渠道id
"channel_name": "测试3333" // 渠道名称
"channel_idcode": "xxxxx", // 渠道统一社会信用代码或者身份证
"origin_id": 10001, // 来源id
"merchant_name": "测试商户7", // 商户名称
"contact_man": "联系人7",
"contact_mobile": "联系电话7",
"contact_email": "联系偶像7",
"contact_addr": "联系地址7",
"created_at": "2020-03-06 06:17:34",
"version": 1,
}]
},
"requestid": "63d4c6f9493a40b58dc31286b9b96c56"
}
3.2 商户信息
url: /web/channelCtl/merchantInfo
请求参数:
{
"id": 7
}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"data": {
"id": 7, // 商户id
"channel_id": 10002, // 渠道id
"channel_name": "测试3333" // 渠道名称
"channel_idcode": "xxxxx", // 渠道统一社会信用代码或者身份证
"origin_id": 10001, // 来源id
"merchant_name": "测试商户7", // 商户名称
"contact_man": "联系人7",
"contact_mobile": "联系电话7",
"contact_email": "联系偶像7",
"contact_addr": "联系地址7",
"created_at": "2020-03-06 06:17:34",
"version": 1,
},
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
3.3 商户保存
url: /web/channelCtl/merchantSave
请求参数:
{
"id": 7, // 为空时添加 不为空时修改
"channel_id": 10002, // 渠道id
"origin_id": 10001, // 来源id
"origin_merchant_id":"", // 来源商户id
"merchant_name":"测试商户7",
"contact_man":"联系人7",
"contact_mobile":"联系电话7",
"contact_email":"联系偶像7",
"contact_addr":"联系地址7"
}
返回结果:
{
"status": 0, // 状态码 0成功 其他失败
"msg": "success",
"requestid": "8b5299922e314dd7a9c2711a312f1952"
}
\ No newline at end of file
...@@ -333,6 +333,14 @@ ...@@ -333,6 +333,14 @@
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz", "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.7.0.tgz",
"integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w==" "integrity": "sha512-32NDda82rhwD9/JBCCkB+MRYDp0oSvlo2IL6rQWA10PQi7tDUM3eqMSltXmY+Oyl/7N3P3qNtAlv7X0d9bI28w=="
}, },
"axios": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
"integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"requires": {
"follow-redirects": "1.5.10"
}
},
"babel-helper-vue-jsx-merge-props": { "babel-helper-vue-jsx-merge-props": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz", "resolved": "https://registry.npmjs.org/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz",
...@@ -1616,6 +1624,24 @@ ...@@ -1616,6 +1624,24 @@
} }
} }
}, },
"follow-redirects": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz",
"integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==",
"requires": {
"debug": "=3.1.0"
},
"dependencies": {
"debug": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
"requires": {
"ms": "2.0.0"
}
}
}
},
"forever-agent": { "forever-agent": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
...@@ -1952,11 +1978,6 @@ ...@@ -1952,11 +1978,6 @@
"resolved": "https://registry.npmjs.org/is-bluebird/-/is-bluebird-1.0.2.tgz", "resolved": "https://registry.npmjs.org/is-bluebird/-/is-bluebird-1.0.2.tgz",
"integrity": "sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI=" "integrity": "sha1-CWQ5Bg9KpBGr7hkUOoTWpVNG1uI="
}, },
"is-buffer": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
},
"is-builtin-module": { "is-builtin-module": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz",
...@@ -2260,16 +2281,6 @@ ...@@ -2260,16 +2281,6 @@
"es5-ext": "~0.10.2" "es5-ext": "~0.10.2"
} }
}, },
"md5": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
"integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=",
"requires": {
"charenc": "~0.0.1",
"crypt": "~0.0.1",
"is-buffer": "~1.1.1"
}
},
"media-typer": { "media-typer": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
...@@ -4290,9 +4301,19 @@ ...@@ -4290,9 +4301,19 @@
"resolved": "https://registry.npmjs.org/wx-pay/-/wx-pay-1.0.2.tgz", "resolved": "https://registry.npmjs.org/wx-pay/-/wx-pay-1.0.2.tgz",
"integrity": "sha1-rhQqFRQ0yjgKgDffgytl3f9JdQQ=", "integrity": "sha1-rhQqFRQ0yjgKgDffgytl3f9JdQQ=",
"requires": { "requires": {
"md5": "^2.0.0",
"request": "^2.54.0", "request": "^2.54.0",
"xml2js": "^0.4.6" "xml2js": "^0.4.6"
},
"dependencies": {
"md5": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz",
"integrity": "sha1-U6s41f48iJG6RlMp6iP6wFQBJvk=",
"requires": {
"charenc": ">= 0.0.1",
"crypt": ">= 0.0.1"
}
}
} }
}, },
"xlsx": { "xlsx": {
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"dependencies": { "dependencies": {
"after": "^0.8.2", "after": "^0.8.2",
"ali-oss": "^4.12.2", "ali-oss": "^4.12.2",
"axios": "^0.19.2",
"babel-polyfill": "^6.26.0", "babel-polyfill": "^6.26.0",
"base64id": "^1.0.0", "base64id": "^1.0.0",
"bluebird": "^3.5.1", "bluebird": "^3.5.1",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment