Bladeren bron

移除http中的service

huangbin 4 jaren geleden
bovenliggende
commit
8d1f78499e

+ 13 - 0
src/common/methods/table/index.ts

@@ -0,0 +1,13 @@
+import APP from '@/services';
+import { Column, TableDefineRsp } from '@/services/go/commonService/interface';
+import { ColumnType, TableKey } from './interface';
+
+/**
+ * 获取动态表头
+ */
+export function getTableHead(tableKey: keyof TableKey): Column[] {
+    const result = APP.get('tableHead').find((e: TableDefineRsp) => e.tablekey === tableKey);
+    return result ? result.columns : [];
+}
+
+export type { ColumnType };

+ 2 - 12
src/services/bus/table.ts → src/common/methods/table/interface.ts

@@ -1,5 +1,3 @@
-import { Column, TableDefineRsp } from '@/services/go/commonService/interface';
-import APP from '@/services';
 
 interface CustomRender {
     customRender: string;
@@ -15,16 +13,8 @@ export interface ColumnType {
     onFilter?: Function;
     sorter?: Function;
 }
-interface TableKey {
+export interface TableKey {
     table_pcweb_delivery: string; // 现货合同
     table_pcweb_userinfo: string; // 客户资料
     table_pcweb_warehouse: string; // 仓库信息
-}
-
-/**
- * 获取动态表头
- */
-export function getTableHead(tableKey: keyof TableKey): Column[] {
-    const result = APP.get('tableHead').find((e: TableDefineRsp) => e.tablekey === tableKey);
-    return result ? result.columns : [];
-}
+}

+ 0 - 46
src/services/bus/goods.ts

@@ -1,46 +0,0 @@
-import { isLogin } from '@/services/bus/login';
-import APP from '@/services';
-import { QueryHsbyMarketGoodsesReponse, QueryHsbyPreGoodsesReponse, QueryHsbyTopGoodsesReponse } from '@/services/http/goodsList/interface';
-import { QueryHsbyMarketGoodses, QueryHsbyTopGoodses, QueryHsbyPreGoodses, QueryHsbyVisitorMarketGoodses } from '@/services/http/goodsList/index';
-import { Ref } from 'vue';
-
-/**
- * 获取商城商品列表
- */
-export function getMallGoods(): QueryHsbyMarketGoodsesReponse[] {
-    if (isLogin()) {
-        return APP.get('mallGoods');
-    } else {
-        return APP.get('touristMallGoods');
-    }
-}
-
-/**
- * 获取新品上市商品列表(一级市场预售)商品列表
- */
-export function getHsbyPreGoods(): QueryHsbyPreGoodsesReponse[] {
-    return APP.get('HsbyPreGoods');
-}
-
-/**
- * 竞价商品列表(二级市场挂牌点选)商品列表
- */
-export function geHsbyListingGoods(): Ref<QueryHsbyTopGoodsesReponse[]> {
-    return APP.getRef('HsbyListingGoods');
-}
-
-/**
- * 查询一级,二级,商城不同市场下的商品列表
- */
-export const queryGoodsList = async (): Promise<string[]> => {
-    // 商城商品 登录与未登录需要查询不同的接口
-    const fn = isLogin() ? QueryHsbyMarketGoodses : QueryHsbyVisitorMarketGoodses;
-    return Promise.all([QueryHsbyTopGoodses(), fn(), QueryHsbyPreGoodses()]);
-};
-
-/**
- * 获取所有的商品列表
- */
-export function getAllGoodsList() {
-    return getMallGoods().concat(geHsbyListingGoods().value as any);
-}

+ 4 - 61
src/services/bus/index.ts

@@ -1,20 +1,13 @@
-import { GetPCMenus, QueryTableDefine } from '@/services/go/commonService/index';
-import { LoginQuery } from '@/services/go/useInfo/index';
 import APP from '@/services';
-import { getAccoutIdList } from '@/services/bus/account';
 import { isLogin } from '@/services/bus/login';
 import { checkTokenLoop, handleTokenCheck } from '@/services/bus/token';
-import { getAppConfig, getCommonApiUrl } from '@/services/http/getconf';
-import { queryAllMyColloct } from '@/services/http/mine/colloct';
-import { queryHsbyMyGoods } from '@/services/http/mine/index';
-import { getServerTime, queryErrorInfos } from '@/services/http/system/index';
-import { queryAccountInfo, queryAreaRoleMarket, queryTaAccountMarket, queryTradeDate } from '@/services/socket/account/index';
-import { querySystemParam } from '@/services/socket/error/index';
-import ProtobufCtr from '@/services/socket/protobuf/index';
+import { GetPCMenus, getServerTime, queryErrorInfos, QueryTableDefine } from '@/services/go/commonService/index';
+import { getAppConfig, getCommonApiUrl } from '@/services/go/config';
+import { LoginQuery } from '@/services/go/useInfo/index';
 import { setServiceURL } from '@/services/request/serviceURL';
+import ProtobufCtr from '@/services/socket/protobuf/index';
 import { localStorageUtil } from '@/utils/storage';
 import { message } from 'ant-design-vue';
-import { pollingNotice } from '../http/notice';
 
 /**
  * 全局数据刷新
@@ -41,9 +34,6 @@ export async function globalDataRefresh(): Promise<string> {
             } else {
                 // token校验成功 马上轮询
                 checkTokenLoop();
-                // 登录并且建立长链成功后 进行资金账号相关业务走长连查询
-                // await queryAfterLogin();
-                await queryAllMyColloct();
                 await GetPCMenus();
                 await QueryTableDefine();
             }
@@ -84,50 +74,3 @@ async function queryDependencies(): Promise<number> {
         return Promise.reject(error);
     }
 }
-
-/**
- * 登录后的查询,涉及各个方面
- */
-export async function queryAfterLogin(): Promise<string> {
-    try {
-        await queryAccountInfo('').catch((err) => {
-            throw '账号信息 查询失败' + err;
-        });
-
-        // 查询市场权限
-        const isArea = (): boolean => APP.get('userInfo').UserType === 5;
-
-        // 查询系统枚举参数
-        await Promise.all([
-            queryHsbyMyGoods(getAccoutIdList()).catch((err: string) => {
-                throw '盘面: ' + err;
-            }),
-            isArea()
-                ? queryAreaRoleMarket().catch((err: string) => {
-                      throw '投资者查根据经纪会员查市场权限 查询失败: ' + err;
-                  })
-                : queryTaAccountMarket().catch((err: string) => {
-                      throw '非投资者查资金市场权限 查询失败: ' + err;
-                  }),
-            querySystemParam().catch(() => {
-                throw '查询系统参数 查询失败';
-            }),
-            // queryAccountTradeRuleAndFeeAndMargin().catch(() => {
-            //     throw '查询账户交易费用与规则信息的方法 查询失败';
-            // }),
-            // queryErrorCode().catch((err) => {
-            //     console.error('查询错误码 查询失败:' + err);
-            //     return '';
-            // }),
-            queryTradeDate().catch(() => {
-                throw '查询交易日 查询失败';
-            }),
-        ]);
-        // 通知公告轮询
-        pollingNotice();
-        return Promise.resolve('ok');
-    } catch (err) {
-        console.error(err);
-        return Promise.reject(err);
-    }
-}

+ 2 - 4
src/services/bus/login.ts

@@ -1,7 +1,7 @@
-import { GetPCMenus, getServerTime, QueryTableDefine } from '@/services/go/commonService/index';
-import { GetLoginID, LoginQuery } from '@/services/go/useInfo/index';
 import APP from '@/services';
 import { checkTokenLoop } from '@/services/bus/token';
+import { GetPCMenus, getServerTime, QueryTableDefine } from '@/services/go/commonService/index';
+import { GetLoginID, LoginQuery } from '@/services/go/useInfo/index';
 import { sessionStorageUtil } from '@/utils/storage/index';
 import Long from 'long';
 import { logoutResponse } from '../socket/login';
@@ -31,8 +31,6 @@ export const login = async (logidCode: string, password: String, byteArr: Uint8A
         // 校验token
         checkTokenLoop();
         await LoginQuery();
-        // await queryGoodsList();
-        // await queryAllMyColloct();
         return loginData;
     } catch (err) {
         return Promise.reject('登录失败:' + err);

+ 1 - 4
src/services/bus/system.ts

@@ -1,8 +1,6 @@
-import eventBus from '@/utils/eventBus';
-import { queryHsbyMyGoods } from '@/services/http/mine/index';
-import { getAccoutIdList } from '@/services/bus/account';
 import { queryAccountInfo } from '@/services/socket/account/index';
 import { parseReceivePush } from '@/services/socket/quota/adapter/index';
+import eventBus from '@/utils/eventBus';
 
 /**
  * 交易通知处理,涉及各个方面
@@ -21,7 +19,6 @@ export const notice = (logout: Function) => {
     // 注册头寸变化通知; => 请求头寸数据,计算持仓盈亏
     eventBus.$onOnly('posChangedNtf', (msg: string) => {
         console.warn(msg);
-        queryHsbyMyGoods(getAccoutIdList());
     });
     // 注册资金变化通知; => 请求资金账户信息,计算资金账户盈亏,可用,净值等
     eventBus.$onOnly('moneyChangedNtf', (msg: string) => {

+ 0 - 0
src/services/http/getconf.ts → src/services/go/config/index.ts


+ 0 - 32
src/services/http/account/index.ts

@@ -1,32 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import * as type from './interface';
-
-/**
- * 资金流水查询(当前)
- * @param params QueryAmountLogParam
- * @returns
- */
-export function QueryAmountLog(params: type.QueryAmountLogParam): Promise<type.QueryAmountLogPsp[]> {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/TaAccount/QueryAmountLog'),
-        params,
-    })
-        .then((value) => value.data.data)
-
-        .catch((err) => Promise.reject(err));
-}
-/**
- * 资金流水查询(当前)
- * @param params QueryAmountLogParam
- * @returns
- */
-export function QueryHisAmountLog(params: type.QueryHisAmountLogParam): Promise<type.QueryHisAmountLogPsp[]> {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/TaAccount/QueryHisAmountLog'),
-        params,
-    })
-        .then((value) => value.data.data)
-        .catch((err) => Promise.reject(err));
-}

+ 0 - 78
src/services/http/account/interface.ts

@@ -1,78 +0,0 @@
-/**
- * 资金流水查询(当前) 查询参数
- */
-export interface QueryAmountLogParam {
-    page?: number; // 页码
-    pageSize?: number; // 每页条数
-    accountID: string; //资金账户 - 格式:1,2,3
-    OperateType?: string; // 资金操作类型 - 格式:1,2,3
-}
-
-/**
- * 资金流水查询(历史)查询参数
- */
-export interface QueryHisAmountLogParam extends QueryAmountLogParam {
-    startDate?: string; //开始时间 - 闭区间,格式:yyyy-MM-dd
-    endDate?: string; //结束时间 - 闭区间,格式:yyyy-MM-dd
-}
-
-/**
- * 资金流水查询(当前)查询结果
- */
-export interface QueryAmountLogPsp {
-    OPERATETYPENAME: string; //资金操作类型名称
-    accountid: number; //资金账户ID
-    agoodscode: string; //竞拍商品代码
-    agoodsname: string; //竞拍商品名称
-    amount: number; //资金金额
-    amountadjusttype: number; //资金调整类型(默认值为0) - 0:系统 1:单边账调整 2:人工调整
-    autoid: number; //流水ID(220+Unix秒时间戳(10位)+xxxxxx)
-    balance: number; //期初余额
-    businesscode: number; //业务编号
-    createtime: string; //发生时间
-    currencyid: number; //币种ID
-    currentbalance: number; //期末余额(变动后金额)
-    dgoodscode: string; //交割商品代码
-    dgoodsname: string; //交割商品名称
-    goodscode: string; //商品代码
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    marketid: number; //市场ID
-    marketname: string; //市场名称
-    moneyticket: number; //资金流水号:银行端流水号
-    operatetype: number; //资金操作类型 (AccountFundCmdOp)- 101:入金 102:入金手续费 103:出金 104:出金冻结 105:出金解冻 106:出金手续费 107:出金手续费冻结 108:出金手续费解冻 201:交易冻结 202:交易解冻 203:交易占用 204:交易解占用 205:交易手续费冻结 206:交易手续费解冻 207:交易手续费 208:交易货款 209:交易盈亏 301:交割冻结 302:交割解冻 303:交割手续费 304:交割手续费冻结 305:交割手续费解冻 306:交割货款 307:交割税款 401:结算盈亏 402:结算递延费 403:分润收入 404:延期分润 501:授信增加 502:授信减少 503:转积分 504:转入 505:转出 506:转出冻结 507:转出解冻 601:履约金额冻结 602:履约最大冻结 603:履约金额解冻 604:履约扣款 605:履约收款 606:履约违约手续费 607:履约违约收入 608:履约最大扣款 701:供应链金融冻结 702:供应链金融解冻 703:供应链金融最大冻结 704:供应链金融利息 705:供应链金融货款 706:供应链金融押金 707:供应链金融最大扣款 801:仓单贸易冻结 802:仓单贸易解冻 803:仓单贸易首付款 804:仓单贸易最大扣款 901:商城扣款冻结 902:商城扣款解冻 903:商城扣款 904:商城收款 1001:期权冻结 1002:期权解冻 1003:期权权力金 1004:期权手续费冻结 1005:期权手续费解冻 1006:期权手续费 1007:期权盈亏 1101:营销扣款 1102:营销收款
-    relationorderid: string; //关联单号
-    remark: string; //备注
-    trademode: number; //交易模式
-}
-/**
- * 资金流水查询(历史) 查询结果
- */
-export interface QueryHisAmountLogPsp {
-    OPERATETYPENAME: string; //资金操作类型名称
-    accountid: number; //资金账户ID
-    agoodscode: string; //竞拍商品代码
-    agoodsname: string; //竞拍商品名称
-    amount: number; //资金金额
-    amountadjusttype: number; //资金调整类型(默认值为0) - 0:系统 1:单边账调整 2:人工调整
-    autoid: number; //流水ID(220+Unix秒时间戳(10位)+xxxxxx)
-    balance: number; //期初余额
-    businesscode: number; //业务编号
-    createtime: string; //发生时间
-    currencyid: number; //币种ID
-    currentbalance: number; //期末余额(变动后金额)
-    dgoodscode: string; //交割商品代码
-    dgoodsname: string; //交割商品名称
-    goodscode: string; //商品代码
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    histradedate: string; //历史交易日
-    isvaliddata: number; //是否有效 - 0:无效 1:有效
-    marketid: number; //市场ID
-    marketname: string; //市场名称
-    moneyticket: number; //资金流水号:银行端流水号
-    operatetype: number; //资金操作类型 (AccountFundCmdOp)- 101:入金 102:入金手续费 103:出金 104:出金冻结 105:出金解冻 106:出金手续费 107:出金手续费冻结 108:出金手续费解冻 201:交易冻结 202:交易解冻 203:交易占用 204:交易解占用 205:交易手续费冻结 206:交易手续费解冻 207:交易手续费 208:交易货款 209:交易盈亏 301:交割冻结 302:交割解冻 303:交割手续费 304:交割手续费冻结 305:交割手续费解冻 306:交割货款 307:交割税款 401:结算盈亏 402:结算递延费 403:分润收入 404:延期分润 501:授信增加 502:授信减少 503:转积分 504:转入 505:转出 506:转出冻结 507:转出解冻 601:履约金额冻结 602:履约最大冻结 603:履约金额解冻 604:履约扣款 605:履约收款 606:履约违约手续费 607:履约违约收入 608:履约最大扣款 701:供应链金融冻结 702:供应链金融解冻 703:供应链金融最大冻结 704:供应链金融利息 705:供应链金融货款 706:供应链金融押金 707:供应链金融最大扣款 801:仓单贸易冻结 802:仓单贸易解冻 803:仓单贸易首付款 804:仓单贸易最大扣款 901:商城扣款冻结 902:商城扣款解冻 903:商城扣款 904:商城收款 1001:期权冻结 1002:期权解冻 1003:期权权力金 1004:期权手续费冻结 1005:期权手续费解冻 1006:期权手续费 1007:期权盈亏 1101:营销扣款 1102:营销收款
-    relationorderid: string; //关联单号
-    remark: string; //备注
-    trademode: number; //交易模式
-}

+ 0 - 29
src/services/http/advert/index.ts

@@ -1,29 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import { AxiosPromise } from 'axios';
-import * as advert from './interface';
-
-/**
- * 查询轮播图配置信息
- * @imageType 类型 - 1:App首页轮播 2:我的
- */
-export const queryImageConfigs = (imageType: number): AxiosPromise<advert.ImageConfigs> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/Common/QueryImageConfigs'),
-        params: { imageType },
-    }).catch((err: Error) => {
-        throw new Error(`查询轮播图配置信息失败:${err.message}`);
-    });
-};
-
-/**
- * 获取终端固定广告配置
- */
-export const queryClientFixedADConfigs = (): AxiosPromise<advert.FixedADConfigs> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryClientFixedADConfigs'),
-    }).catch((err: Error) => {
-        throw new Error(`获取终端固定广告配置失败:${err.message}`);
-    });
-};

+ 0 - 47
src/services/http/advert/interface.ts

@@ -1,47 +0,0 @@
-interface HttpRespone {
-    code: number;
-    msg: string;
-    page: number;
-    pagesize: number;
-    total: number;
-}
-
-interface imageConfigs {
-    areauserid	:number;//所属机构ID
-    configid	:number;//配置ID(SEQ_SZDZ2_IMAGECONFIG)
-    createdate	:string;//创建时间
-    creatorid	:number;//创建人
-    imagepath	:string;//图片
-    imagetype	:number;//类型 - 1:首页轮播(移动) 2:我的(移动)
-    isshow	:number;//是否展示 - 0:不展示 1:展示
-    marketid	:number;//市场ID
-    modifierid	:number;//操作人
-    sort	:number;//排序
-    title	:string;//标题
-    trademode	:number;//交易模式
-    updatedate	:string;//修改时间
-    url	:string;//链接(地址或商品ID)
-    urltype	:number;//链接类型 - 1:直接地址 2:商品ID
-}
-export interface ImageConfigs extends HttpRespone {
-    data: imageConfigs[];
-}
-
-export interface fixedADConfigs {
-    adsort: number; //排序
-    adtype: number; //广告位类型 - 1:热卖商品(HSBY) 2:新品抢购(HSBY) 3:当季热玩(HSBY)
-    areauserid: number; //所属机构ID
-    createdate: string; //创建时间
-    creatorid: number; //创建人
-    imagepath: string; //图片
-    isshow: number; //是否展示 - 0:不展示 1:展示
-    modifierid: number; //操作人
-    recsize: string; //推荐尺寸
-    title: string; //标题
-    updatedate: string; //更新时间
-    urlcontent: string; //链接(地址或商品ID)
-    urltype: number; //链接类型 - 1:直接地址 2:商品ID
-}
-export interface FixedADConfigs extends HttpRespone {
-    data: fixedADConfigs[];
-}

+ 0 - 77
src/services/http/goodsDeatil/index.ts

@@ -1,77 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import * as type from './interface';
-
-/**
- * 查询一级市场(预售)商品信息详情
- * @param params QueryGoodsDetail
- */
-export function QueryHsbyPreGoodsDetail(params: type.QueryGoodsDetail): Promise<type.PreGoodsDetailInterface> {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'get',
-            url: goCommonSearchUrl('/HSBY/QueryHsbyPreGoodsDetail'),
-            params,
-        })
-            .then((value) => resolve(value.data.data))
-            .catch((err) => reject(err));
-    });
-}
-
-/**
- * 查询二级市场(挂牌点选)商品信息详情
- * @param params QueryGoodsDetail
- */
-export function QueryHsbyListingGoodsDetail(params: type.QueryGoodsDetail): Promise<type.ListingGoodsDetailInterface> {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'get',
-            url: goCommonSearchUrl('/HSBY/QueryHsbyListingGoodsDetail'),
-            params,
-        })
-            .then((value) => resolve(value.data.data))
-            .catch((err) => reject(err));
-    });
-}
-
-/**
- * 查询三级市场(商城)商品信息详情
- * @param orderID // 委托单号
- */
-export function QueryHsbyMarketGoodsDetail(orderID: string): Promise<type.MarketGoodsDetailInterface> {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'get',
-            url: goCommonSearchUrl('/HSBY/QueryHsbyMarketGoodsDetail'),
-            params: { orderID },
-        })
-            .then((value) => resolve(value.data.data))
-            .catch((err) => reject(err));
-    });
-}
-
-/**
- * 查询游客三级市场(商城)商品信息详情
- *
- * @param orderID // 委托单号
- */
-export function QueryHsbyVisitorMarketGoodsDetail(goodsID: string): Promise<type.MarketGoodsDetailInterface> {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'get',
-            url: goCommonSearchUrl('/HSBY/QueryHsbyVisitorMarketGoodsDetail'),
-            params: { goodsID },
-        })
-            .then((value) => resolve(value.data.data))
-            .catch((err) => reject(err));
-    });
-}
-
-export function QueryHsbyGoodsOrderDetails(params: type.QueryHsbyGoodsOrderDetailsParam): Promise<type.HsbyGoodsOrderDetailRsp[]> {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryHsbyGoodsOrderDetails'),
-        params,
-    })
-        .then((value) => value.data.data)
-        .catch((err) => Promise.reject(err));
-}

+ 0 - 128
src/services/http/goodsDeatil/interface.ts

@@ -1,128 +0,0 @@
-// 查询一级市场(预售)商品信息详情 返回类型
-export interface PreGoodsDetailInterface {
-    agreeunit: number; // 合约单位
-    buymaxqty: number; // 购买上限 [71] - 0为不限
-    currency: string; // 货币
-    currencysign: string; // 货币符号
-    customername: string; // 发行单位
-    decimalplace: number; //报价小数位
-    desccityid: number; // 目的地(市)ID
-    descprovinceid: number; // 目的地(省)ID
-    enableqty: number; // 剩余数量
-    goodscode: string; // 商品代码(内部)
-    goodsdesc: string; // 商品详情
-    goodsid: number; //商品ID(自增ID SEQ_GOODS)
-    goodsname: string; // 商品名称
-    goodsstatus: number; // 商品状态- 2:未上市 3:上市
-    goodunit: string; // 报价单位
-    lasttradedate: string; // 最后交易日期(状态:待退市)
-    listingdate: string; // 交易开始日期
-    lotsize: number; //手数最小变动单位
-    marketid: number; //所属市场ID
-    picurls: string; // 介绍图片[多张用逗号分隔]
-    presaledqty: number; // 已预售量(预售结束时更新)
-    presaleqty: number; // 预售数量
-    quoteminunit: number; // 行情最小变动单位 [整数,报价小数位一起使用]
-    refprice: number; //参考价格[一口价]
-    relatedgoodsid: number; //关联交易合约ID
-    stepvalue: number; //价格最小变动单位
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    vendorattr: string; // 供应商附件(多张,逗号分隔)
-    vendorname: string; // 供应商名称
-    vendorphone: string; //供应商客服电话
-    videourls: string; //介绍视频[多张用逗号分隔]
-}
-
-// 查询二级市场(挂牌点选)商品信息详情 返回类型
-export interface ListingGoodsDetailInterface {
-    agreeunit: number; //合约单位
-    buymaxqty: number; //购买上限 [71] - 0为不限
-    currency: string; //货币
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    desccityid: number; //目的地(市)ID
-    descprovinceid: number; //目的地(省)ID
-    goodscode: string; //商品代码(内部)
-    goodsdesc: string; //商品详情
-    goodsid: number; //商品ID(自增ID SEQ_GOODS)
-    goodsname: string; //商品名称
-    goodsprice: number; //商品价格
-    hotindex: number; //景点热度
-    last: number; //现价
-    limitdown: number; //跌停价
-    limitup: number; //涨停价
-    lotsize: number; //手数最小变动单位
-    marketid: number; //所属市场ID
-    picurls: string; //介绍图片[多张用逗号分隔]
-    quoteminunit: number; //行情最小变动单位 [整数,报价小数位一起使用]
-    stepvalue: number; //价格最小变动单位
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    vendorattr: string; //供应商附件(多张,逗号分隔)
-    vendorname: string; //供应商名称
-    vendorphone: string; //供应商客服电话
-    videourls: string; //介绍视频[多张用逗号分隔]
-}
-// 查询三级市场(商城)商品信息详情 返回类型
-export interface MarketGoodsDetailInterface {
-    accountid: number; //账户ID[报价币种]
-    agreeunit: number; //合约单位
-    buymaxqty: number; //购买上限 [71] - 0为不限
-    buyorsell: number; //买卖 - 0:买 1:卖
-    cancelqty: number; //撤单数量
-    categoryid: number; //类别ID(WRCATEGORY)
-    currency: string; //货币
-    currencysign: string; //货币符号
-    customername: string; //卖家名称
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsdesc: string; //商品详情
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    goodsprice: number; //商品价格
-    hotindex: number; //景点热度
-    lotsize: number; //手数最小变动单位
-    marketid: number; //市场ID
-    orderid: string; //委托单号(100+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    orderprice: number; //委托价格
-    orderqty: number; //委托数量
-    orderstatus: number; //委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 10:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
-    picurls: string; //介绍图片[多张用逗号分隔]
-    quoteminunit: number; //行情最小变动单位 [整数,报价小数位一起使用]
-    sellUserID: number; //卖方UserID
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    tradeqty: number; //成交数量
-    vendorattr: string; //供应商附件(多张,逗号分隔)
-    vendorname: string; //供应商名称
-    vendorphone: string; //供应商客服电话
-    videourls: string; //介绍视频[多张用逗号分隔]
-}
-
-export interface QueryGoodsDetail {
-    goodsID: number; // 商品ID
-    AccountID?: number; // 资金账户,主要用于获取交易规则。不传则获取通用规则。
-}
-
-/**
- * 查询二级市场(挂牌点选)商品对应的挂牌委托单信息 查询参数
- */
-export interface QueryHsbyGoodsOrderDetailsParam {
-    goodsID: number; // 商品ID
-    accountIDs?: string; // 摘牌方资金账户列表,格式:1,2,3。主要用于过滤自己的挂牌单
-    buyOrSell?: number; // 挂牌委托单方向(对手单方向),0:买 1:卖
-    price?: number; // 参考价格。对手单买方向委托单则价格大于等于(站在摘牌人的角度,摘牌方面是卖,我的闲置下单);对手单卖方向委托单则价格小于等于(站在摘牌人的角度,摘牌方面是买,热门商品下单)
-    speed?: number; // 档位,不传则默认为3档
-}
-
-/**
- * 查询二级市场(挂牌点选)商品对应的挂牌委托单信息 响应数据接口
- */
-export interface HsbyGoodsOrderDetailRsp {
-    buyorsell: number; //买卖 - 0:买 1:卖
-    currencysign: string; //货币符号
-    customername: string; //客户名称(企业名称),已脱敏
-    enableqty: number; //可用数量
-    goodunit: string; //报价单位
-    orderid: string; //委托单号(100+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    orderprice: number; //委托价格
-    ordertime: string; //委托时间
-}

+ 0 - 75
src/services/http/mine/colloct.ts

@@ -1,75 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import { getUserId } from '@/services/bus/account';
-import APP from '@/services';
-import { message } from 'ant-design-vue';
-
-interface MyCollect {
-    goodsid: number;
-}
-
-/**
- * 获取用户商品收藏信息
- */
-export function queryAllMyColloct(): Promise<string> {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/User/QueryUserFavoriteGoodses'),
-        params: { userID: getUserId() },
-    })
-        .then((res) => {
-            const result = res.data.data.map((e: MyCollect) => e.goodsid);
-            APP.set('collctList', result);
-            console.log('获取用户商品收藏信息', result);
-
-            return 'ok';
-        })
-        .catch((err: Error) => {
-            throw new Error(`查询用户商品收藏信息失败:${err.message}`);
-        });
-}
-
-/**
- * 添加用户商品收藏信息
- * @param goodsID 添加收藏商品 id
- */
-export function addCollct(goodsID: number): Promise<string> {
-    const params = {
-        userID: getUserId(),
-        goodsID,
-    };
-    return request({
-        method: 'post',
-        url: goCommonSearchUrl('/User/AddUserFavoriteGoods'),
-        params,
-    })
-        .then(() => {
-            message.success('收藏成功');
-            return queryAllMyColloct().then(() => 'ok');
-        })
-        .catch((err: Error) => {
-            throw new Error(`添加用户商品收藏信息失败:${err}`);
-        });
-}
-
-/**
- * 移除用户商品收藏信息
- * @param goodsID 移除收藏商品 id
- */
-export function removeCollct(goodsID: number): Promise<string> {
-    const params = {
-        userID: getUserId(),
-        goodsID,
-    };
-    return request({
-        method: 'post',
-        url: goCommonSearchUrl('/User/RemoveUserFavoriteGoods'),
-        params,
-    })
-        .then(() => {
-            message.success('删除收藏成功');
-            return queryAllMyColloct().then(() => 'ok');
-        })
-        .catch((err: Error) => {
-            throw new Error(`添加用户商品收藏信息失败:${err.message}`);
-        });
-}

+ 0 - 301
src/services/http/mine/index.ts

@@ -1,301 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import { AxiosPromise } from 'axios';
-import * as mineType from './interface';
-import APP from '@/services';
-import { calcAmount } from '@/services/bus/account';
-import { serviceURL } from '@/services/request/index';
-
-/**
- * 查询我的订单信息 - 已完成单据信息
- * @param page 页码
- * @param pagesize 每页条数
- * @param accountIDs 资金账户列表,格式:1,2,3
- */
-export const queryHsbyBuyMyTradeDetail = (accountIDs: string, page?: number, pagesize?: number): AxiosPromise<mineType.HsbyBuyMyTradeDetail> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryHsbyBuyMyTradeDetail'),
-        params: { page, pagesize, accountIDs },
-    }).catch((err: Error) => {
-        throw new Error(`查询我的订单信息失败:${err.message}`);
-    });
-};
-
-/**
- * 查询我的订单信息 - 全部单据信息
- * 说明: 全部:一二级市场买委托;抢购中:一级市场买摘; 求购中:二级市场买挂; 3:已完成:一二级市场已完成买委托;
- * @param accountIDs 资金账户列表,格式:1,2,3
- * @param myBuyStatus 我的订单’状态, 1:抢购中 2:求购中 3:已完成;不传则为’全部’
- */
-export const queryHsbyMyBuyOrderDetails = (accountIDs: string, myBuyStatus?: number): AxiosPromise<mineType.HsbyMyBuyOrderDetails> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryHsbyMyBuyOrderDetails'),
-        params: { accountIDs, myBuyStatus },
-    }).catch((err: Error) => {
-        throw new Error(`查询“我的订单”信息失败:${err.message}`);
-    });
-};
-
-/**
- * 查询我的订单信息 - 待付款单据信息
- * @param QueryMyPayOrderParam
- */
-
-export const queryMyPayOrders = (params: mineType.QueryMyPayOrderParam): Promise<mineType.queryMyPayOrders[]> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryMyPayOrders'),
-        params,
-    })
-        .then((res) => res.data.data)
-        .catch((err: Error) => {
-            throw new Error(`获取我的订单中待付款信息 失败:${err.message}`);
-        });
-};
-
-/**
- * 查询“我的商品”信息
- * @param accountIDs 资金账户列表,格式:1,2,3
- */
-export const queryHsbyMyGoods = (accountIDs: string): AxiosPromise<mineType.QueryHsbyMyGoods> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryHsbyMyGoods'),
-        params: { accountIDs },
-    })
-        .then((res) => {
-            APP.set('myGoodsHold', res.data.data);
-            calcAmount();
-            return Promise.resolve(res.data.data);
-        })
-        .catch((err: Error) => {
-            throw new Error(`查询“我的商品”信息失败:${err.message}`);
-        });
-};
-
-/**
- * 查询我的包裹信息
- * @param accountIDs 资金账户列表,格式:1,2,3
- * @param takeOrderStatus 提货状态 - 1:待发货 2:已发货 3:已收货
- */
-export const queryHsbyMyPackages = (accountIDs: string, takeOrderStatus?: number): AxiosPromise<mineType.QueryHsbyMyPackages> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryHsbyMyPackages'),
-        params: { accountIDs, takeOrderStatus },
-    }).catch((err: Error) => {
-        throw new Error(`查询我的包裹信息失败:${err.message}`);
-    });
-};
-
-/**
- * 查询"我的闲置"单据信息
- * 说明:发布中 - 二级市场卖挂,3:委托成功、7:部分成交; 已完成 - 二级市场成交单,包括历史数据。查询结果已按时间从近到远排序
- * @param page 页码
- * @param pagesize 每页条数
- * @param accountIDs 资金账户列表,格式:1,2,3
- * @param orderType 单据类型:0 - 待成交, 1 - 已完成
- */
-export const queryHsbySellMyDetails = (accountIDs: string, orderType?: number, page?: number, pagesize?: number): AxiosPromise<mineType.QueryHsbySellMyDetails> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryHsbySellMyDetails'),
-        params: { page, pagesize, accountIDs, orderType },
-    }).catch((err: Error) => {
-        throw new Error(`查询我的闲置信息失败:${err.message}`);
-    });
-};
-
-/**
- * 我的闲置中收款信息查询(待收款)
- * @param page 页码
- * @param pagesize 每页条数
- * @param accountIDs 资金账户列表,格式:1,2,3
- */
-export const queryMyCollectionOrders = (accountIDs: string, page?: number, pagesize?: number, orderType?: number): AxiosPromise<mineType.QueryMyCollectionOrders> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryMyCollectionOrders'),
-        params: { page, pagesize, accountIDs, orderType },
-    }).catch((err: Error) => {
-        throw new Error(`我的闲置中待收款信息查询失败:${err.message}`);
-    });
-};
-
-/**
- * 我的优惠卷持仓查询
- * 说明:当holdStatus传入4(已过期), 不传然后对响应数据过滤1,2(待使用),会从历史表中查询已过期的优惠卷数据。
- * @param accountIDs 资金账户列表,格式:1,2,3
- * @param holdStatus 持仓状态 - 1:未生效 2:已生效 3:已使用 4:已过期,格式:1,2,3
- */
-export const queryMyCouponHolds = (accountIDs: string, holdStatus?: string): AxiosPromise<mineType.QueryMyCouponHolds> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryMyCouponHolds'),
-        params: { accountIDs, holdStatus },
-    }).catch((err: Error) => {
-        throw new Error(`我的优惠卷持仓查询 失败:${err.message}`);
-    });
-};
-
-/**
- * 我的优惠卷查询
- * 说明:当holdStatus 4(已过期)后,会从历史表中查询已过期的优惠卷数据。
- * @param accountIDs 资金账户列表,格式:1,2,3
- * @param goodsID 商品ID, 一般与sellUserID配套传入
- * @param sellUserID 卖方UserID
- */
-// export const queryMyCoupons = (accountIDs: string, goodsID?: number, sellUserID?: number): AxiosPromise<mineType.QueryMyCoupons> => {
-//     return request({
-//         method: 'get',
-//         url: goCommonSearchUrl('/HSBY/QueryMyCoupons'),
-//         params: { accountIDs, goodsID, sellUserID },
-//     }).catch((err: Error) => {
-//         throw new Error(`我的优惠卷查询 失败:${err.message}`);
-//     });
-// };
-
-/**
- * 已使用优惠卷查询
- * @param accountIDs 资金账户列表,格式:1,2,3
- */
-export const queryMyUsedCoupon = (accountIDs: string): AxiosPromise<mineType.QueryMyUsedCoupon> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryMyUsedCoupon'),
-        params: { accountIDs },
-    }).catch((err: Error) => {
-        throw new Error(`查询已使用优惠卷查询 失败:${err.message}`);
-    });
-};
-
-/**
- * 查询省市信息(不包括区)
- * @param provinceID 省ID
- */
-export const queryProvincesAndCities = (provinceID: string | null = null): Promise<mineType.QueryProvincesAndCities[]> => {
-    const params = provinceID ? { provinceID } : {};
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/QueryProvincesAndCities'),
-        params,
-    })
-        .then((value) => Promise.resolve(value.data.data))
-        .catch((err: Error) => {
-            throw new Error(`查询省市信息(不包括区) 失败:${err.message}`);
-        });
-};
-
-/**
- * 设置我的包裹已收货状态
- * @param takeOrderID 提货单号
- * @param accountID 资金账号
- */
-export const setHsbyMyPackagesStatus = (takeOrderID: string, accountID: string): AxiosPromise<mineType.SetHsbyMyPackagesStatus> => {
-    return request({
-        method: 'post',
-        url: goCommonSearchUrl('/HSBY/SetHsbyMyPackagesStatus'),
-        params: { takeOrderID, accountID },
-    }).catch((err: Error) => {
-        throw new Error(`设置我的包裹已收货状态 失败:${err.message}`);
-    });
-};
-
-/**
- * 添加用户商品收藏信息
- * @param userID 用户ID
- * @param goodsID 商品ID
- */
-export const addUserFavoriteGoods = (userID: string, goodsID: string): AxiosPromise<mineType.HttpRespone> => {
-    return request({
-        method: 'post',
-        url: goCommonSearchUrl('/User/AddUserFavoriteGoods'),
-        params: { userID, goodsID },
-    }).catch((err: Error) => {
-        throw new Error(`获取用户商品收藏信息 失败:${err.message}`);
-    });
-};
-
-/**
- * 获取用户商品收藏信息
- * @param userID 用户ID
- */
-export const queryUserFavoriteGoodses = (userID: string): AxiosPromise<mineType.QueryUserFavoriteGoodses> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/User/QueryUserFavoriteGoodses'),
-        params: { userID },
-    }).catch((err: Error) => {
-        throw new Error(`获取用户商品收藏信息 失败:${err.message}`);
-    });
-};
-
-/**
- * 添加用户留言板信息
- * @param userID 用户ID
- * @param message 留言信息
- */
-export const addMessageBoard = (userID: number, message: string, contactNum: string): AxiosPromise<mineType.HttpRespone> => {
-    return request({
-        method: 'post',
-        url: goCommonSearchUrl('/User/AddMessageBoard'),
-        params: { userID, message, contactNum },
-    }).catch((err: Error) => {
-        throw new Error(`添加用户留言板信息 失败:${err.message}`);
-    });
-};
-
-/**
- * 获取用户留言板信息
- * @param userID 用户ID
- */
-export const queryMessageBoard = (userID: number): AxiosPromise<mineType.QueryMessageBoard> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/User/QueryMessageBoard'),
-        params: { userID },
-    }).catch((err: Error) => {
-        throw new Error(`添加用户留言板信息 失败:${err.message}`);
-    });
-};
-
-/**
- * 获取支付二维码链接
- * @param param 用户ID
- */
-export const getQrCode = (param: mineType.GetQrCodeReq): AxiosPromise<mineType.GetQrCode> => {
-    return request({
-        method: 'post',
-        url: serviceURL.hsbyPayUrlWeb,
-        data: param,
-    }).catch((err: Error) => {
-        throw new Error(`获取支付二维码 失败:${err.message}`);
-    });
-};
-
-/**
- * 用第三方控间生成二维码
- * @param param 用户ID
- */
-// export const createQRCode = (http: string): void => {
-//     new QRCode('qrcode', {
-//         width: 204, // 设置宽度,单位像素
-//         height: 205, // 设置高度,单位像素
-//         text: http, // 设置二维码内容或跳转地址
-//     });
-// };
-
-/**
- * 获取我的相关业务单据数量
- * @param userID 用户ID
- */
-export const getHsbyMyCount = (accountIDs: string): AxiosPromise<mineType.GetHsbyMyCount> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/HSBY/GetHsbyMyCount'),
-        params: { accountIDs },
-    }).catch((err: Error) => {
-        throw new Error(`获取我的相关业务单据数量 失败:${err.message}`);
-    });
-};

+ 0 - 391
src/services/http/mine/interface.ts

@@ -1,391 +0,0 @@
-export interface HttpRespone {
-    code: number;
-    msg: string;
-    page: number;
-    pagesize: number;
-    total: number;
-}
-export interface hsbyBuyMyTradeDetail {
-    accountid: number; //账户ID[报价币种]
-    agreeunit: number; //合约单位
-    amount: number; //金额 = 价格  数量  合约单位
-    buyorsell: number; //买卖 - 0:买 1:卖
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    marketid: number; //市场ID
-    orderamount: number; //委托金额
-    orderid: string; //单号(成交单号)
-    picurls1: string; //预售商品介绍图片[多张用逗号分隔]
-    picurls2: string; //挂牌商品介绍图片[多张用逗号分隔]
-    price: number; //价格
-    qty: number; //数量
-    time: string; //时间
-    trademode: number; //交易模式 - 16:热卖 70:特卖 71:新品
-    vendorname1: string; //预售商品供应商名称
-    vendorname2: string; //挂牌商品供应商名称
-}
-export interface HsbyBuyMyTradeDetail extends HttpRespone {
-    data: hsbyBuyMyTradeDetail[];
-}
-
-export interface hsbyMyBuyOrderDetails {
-    accountid: number; //账户ID[报价币种]
-    agreeunit: number; //合约单位
-    buyorsell: number; //买卖 - 0:买 1:卖
-    cancelqty: number; //撤单数量
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    listingselecttype: number; //挂牌点选类型 - 1:挂牌 2:摘牌 3:先摘后挂
-    marketid: number; //市场ID
-    mybuystatus: number; //"我的订单"显示状态- 1:抢购中 2:求购中 3:已完成 4:已撤消 5:委托失败
-    orderamount: number; //委托金额
-    orderid: string; //委托单号(100+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    orderprice: number; //委托价格
-    orderqty: number; //委托数量
-    orderstatus: number; //委托状态 - 1: 委托请求 2:待冻结 3:委托成功 4: 委托失败 5:配对成功 6: 已撤销 7:部分成交 8:已成交 9:部成部撤 10:成交失败 11:已拒绝 12:经过摘牌(先摘后挂专用-先摘后挂已摘过) 13:冻结成功(通道交易专用) 14:通道已撤 15:通道部成部撤 16:成交失败违约(荷兰式竞拍专用)
-    ordertime: string; //委托时间
-    picurls1: string; //预售商品介绍图片[多张用逗号分隔]
-    picurls2: string; //挂牌商品介绍图片[多张用逗号分隔]
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    tradeqty: number; //成交数量
-    vendorname1: string; //预售商品供应商名称
-    vendorname2: string; //挂牌商品供应商名称
-}
-export interface HsbyMyBuyOrderDetails extends HttpRespone {
-    data: hsbyMyBuyOrderDetails[];
-}
-
-export interface queryHsbyMyGoods {
-    accountid: number; //账号Id
-    agreeunit: number; //合约单位
-    buyaverageprice: number; //持仓均价
-    buycurholderamount: number; //买当前持仓总金额[商品币种]
-    buycurpositionqty: number; //买当前持仓总数量
-    buymaxqty: number; //购买上限 [71] - 0为不限
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    enableqty: number; //可用数量
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品Id
-    goodsname: string; //商品名称
-    goodsprice: number; //商品价格
-    goodsstatus: number; //商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
-    last: number; //现价(仅使用于挂牌点选)
-    limitdown: number; //跌停价(仅使用于挂牌点选)
-    limitup: number; //涨停价(仅使用于挂牌点选)
-    lotsize: number; //手数最小变动单位
-    marketid: number; //所属市场ID
-    picurls: string; //介绍图片[多张用逗号分隔]
-    quoteminunit: number; //行情最小变动单位 [整数,报价小数位一起使用]
-    stepvalue: number; //价格最小变动单位
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-}
-export interface QueryHsbyMyGoods extends HttpRespone {
-    data: queryHsbyMyGoods[];
-}
-
-export interface queryHsbyMyPackages {
-    accountid: number; //账户ID
-    address: string; //提货人详细地址
-    agreeunit: number; //合约单位
-    amount: number; //提货金额
-    auditer: number; //审核人
-    audittime: string; //审核时间
-    averageprice: number; //均价
-    cardnum: string; //提货人证件号码
-    cardtypeid: number; //提货人证件类型
-    checkremark: string; //审核备注
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    handlestatus: number; //处理状态
-    marketid: number; //市场ID
-    phonenum: string; //提货人联系方式
-    picurls: string; //介绍图片[多张用逗号分隔]
-    qty: number; //提货数量
-    recivername: string; //提货人姓名
-    reqtime: string; //更新时间
-    takemode: number; //提货方式 - 2:自提 3:配送
-    takeorderid: string; //提货单号(905+Unix秒时间戳(10位)+xxxxxx)
-    takeorderstatus: number; //提货状态 - 1:待发货 2:已发货 3:已收货
-    takeremark: string; //提货备注
-    tradedate: string; //交易日(yyyyMMdd)
-    userid: number; //用户ID
-    vendorname: string; //供应商名称
-    trademode: number;
-}
-export interface QueryHsbyMyPackages extends HttpRespone {
-    data: queryHsbyMyPackages[];
-}
-
-export interface queryHsbySellMyDetails {
-    accountid: number; //账户ID[报价币种]
-    agreeunit: number; //合约单位
-    buyorsell: number; //买卖 - 0:买 1:卖
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    marketid: number; //市场ID
-    orderid: string; //单号(发布中 - 委托单号;已完成 - 成交单号)
-    ordertype: number; //单据类型:0 - 发布中, 1 - 已完成
-    picurls: string; //介绍图片[多张用逗号分隔]
-    price: number; //价格
-    qty: number; //数量
-    time: string; //时间
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    vendorname: string; //供应商名称
-}
-export interface QueryHsbySellMyDetails extends HttpRespone {
-    data: queryHsbySellMyDetails[];
-}
-
-export interface queryMyCollectionOrders {
-    agreeunit: number; //合约单位
-    buyaccountid: number; //买方账号ID[报价币种]
-    buyorderid: string; //买方委托单号
-    createtime: string; //创建时间
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    marketid: number; //市场ID
-    offamount: number; //优惠金额
-    payamount: number; //支付金额 = TradeAmount + TradeCharge - OffAmount
-    payflag: number; //付款标识 - 1:未支付 2:已支付 3:已过期 4:已撤销 5:结算过期 6:预售终止
-    paylimitedtime: string; //支付期限
-    paytime: string; //付款时间
-    picurls: string; //商品介绍图片[多张用逗号分隔]
-    sellaccountid: number; //卖方账号ID[报价币种]
-    sellorderid: string; //卖方委托单号
-    tradeamount: number; //成交金额
-    tradecharge: number; //成交手续费(买方)
-    tradedate: string; //交易日(yyyyMMdd)
-    tradeid: string; //成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    tradeprice: number; //成交价格
-    tradeqty: number; //成交数量
-}
-export interface QueryMyCollectionOrders extends HttpRespone {
-    data: queryMyCollectionOrders[];
-}
-
-export interface queryMyCouponHolds {
-    accountid: number; //资金账户ID
-    conditionvalue: number; //条件阈值(可为0)
-    couponcategroy: number; //种类 - 1:现金券 2:折扣券 3:折扣券(单个商品)
-    couponholdid: string; //优惠券持仓ID(229+Unix秒时间戳(10位)+xxxxxx)
-    couponname: string; //优惠券名称
-    coupontypeid: string; //优惠券类型ID - SEQ_COUPONTYPE
-    couponvalue: number; //面值[1:现金券 - 抵扣值 2:折扣券-折扣值]
-    createtime: string; //创建时间
-    enddate: string; //结束日期
-    giveapplyid: number; //发放申请ID(SEQ_COUPONGIVEAPPLY)
-    holdstatus: number; //持仓状态 - 1:未生效 2:已生效 3:已使用 4:已过期
-    isgeneral: number; //是否通用券 - 0:否 1:是
-    limitedflag: number; //是否指定商品 - 0:不限 1:限制
-    limitedgoodsids: string; //指定商品IDs[逗号分隔]
-    qty: number; //数量(按1平铺)
-    startdate: string; //开始日期
-    userid: number; //用户ID
-    userscope: string; //卖家范围(用户ID,逗号分隔) [IsGeneral =0时使用]
-}
-export interface QueryMyCouponHolds extends HttpRespone {
-    data: queryMyCouponHolds[];
-}
-
-export interface queryMyCoupons {
-    accountid: number; //资金账户ID
-    areauserid: number; //所属机构
-    conditionvalue: number; //条件阈值(可为0)
-    couponcategroy: number; //种类 - 1:现金券 2:折扣券 3:折扣券(单张)
-    couponname: string; //优惠券名称
-    coupontypeid: string; //优惠券类型ID
-    couponvalue: number; //面值[1:现金券 - 抵扣值 2:折扣券-折扣值]
-    curfreezeqty: number; //期末冻结数量
-    curqty: number; //期末数量
-    isgeneral: number; //是否通用券 - 0:否 1:是
-    isunusable: boolean; //是否不可用
-    limitedflag: number; //是否指定商品 - 0:不限 1:限制
-    limitedgoodsids: string; //指定商品IDs[逗号分隔,前后加逗号]
-    orifreezeqty: number; //期初冻结数量
-    oriqty: number; //期初数量
-    reasontype: number; //不可用原因 - 0:未确认 1:不可用于此商品 2:不可用于此卖家
-    todaydecrease: number; //今日减少
-    todayincrease: number; //今日增加
-    userid: number; //用户ID
-    userscope: string; //卖家范围(用户ID,逗号分隔,前后加逗号) [IsGeneral =0时使用]
-}
-export interface QueryMyCoupons extends HttpRespone {
-    data: queryMyCoupons[];
-}
-
-export interface queryMyPayOrders {
-    agreeunit: number; //合约单位
-    buyaccountid: number; //买方账号ID[报价币种]
-    buyorderid: string; //买方委托单号
-    createtime: string; //创建时间
-    currencysign: string; //货币符号
-    decimalplace: number; //报价小数位
-    goodscode: string; //商品代码(内部)
-    goodsid: number; //商品ID
-    goodsname: string; //商品名称
-    marketid: number; //市场ID
-    offamount: number; //优惠金额
-    payamount: number; //支付金额 = TradeAmount + TradeCharge - OffAmount
-    payflag: number; //付款标识 - 1:未支付 2:已支付 3:已过期 4:已撤销 5:结算过期 6:预售终止
-    paylimitedtime: string; //支付期限
-    paytime: string; //付款时间
-    picurls1: string; //预售商品介绍图片[多张用逗号分隔]
-    picurls2: string; //挂牌商品介绍图片[多张用逗号分隔]
-    sellaccountid: number; //卖方账号ID[报价币种]
-    sellorderid: string; //卖方委托单号
-    tradeamount: number; //成交金额
-    tradecharge: number; //成交手续费(买方)
-    tradedate: string; //交易日(yyyyMMdd)
-    tradeid: string; //成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    trademode: number; //交易模式 - 10:做市 13:竞价 15:通道交易 16:挂牌点选 17:仓单贸易 18:期权 19:竞拍-降价式 20:竞拍-竞价式 21:竞拍-大宗式 22:受托竞价
-    tradeprice: number; //成交价格
-    tradeqty: number; //成交数量
-    vendorname1: string; //预售商品供应商名称
-    vendorname2: string; //挂牌商品供应商名称
-}
-export interface QueryMyPayOrders extends HttpRespone {
-    data: queryMyPayOrders[];
-}
-
-export interface QueryMyPayOrderParam {
-    page?: number; // 页码
-    pagesize?: number; //每页条数
-    accountIDs: string; //  资金账户列表,格式:1,2,3
-    buyOrderID?: string; // 买方委托单号
-    sellOrderID?: string; // 卖方委托单号
-}
-
-export interface queryMyUsedCoupon {
-    accountid: number; //资金账户ID(买方)
-    conditionvalue: number; //条件阈值(可为0)
-    couponcategroy: number; //种类 - 1:现金券 2:折扣券
-    couponname: string; //优惠券名称
-    coupontypeid: string; //优惠券类型ID(买方)
-    couponvalue: number; //面值[1:现金券 - 抵扣值 2:折扣券-折扣值(0-100)]
-    createtime: string; //创建时间
-    goodsid: number; //商品ID
-    handlestatus: number; //处理状态
-    marketid: number; //市场ID
-    offamount: number; //优惠金额
-    orderid: string; //委托单号(100+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    sellaccountid: number; //资金账户ID(卖方)
-    tradeamount: number; //成交金额
-    tradeid: string; //成交单号(101+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
-    usedqty: number; //使用数量
-}
-export interface QueryMyUsedCoupon extends HttpRespone {
-    data: queryMyUsedCoupon[];
-}
-
-export interface cities {
-    autoid: number; //自增ID
-    divisioncode: string; //行政代码
-    divisionlevel: string; //行政级别
-    divisionname: string; //行政名称
-    modifierid: number; //修改人
-    modifytime: string; //修改时间
-    parentcode: string; //上级行政代码
-    pathname: string; //路径名称
-    postcode: string; //邮政编码
-    separablename: string; //可拆分的全称
-    shortcode: string; //地区简码
-}
-
-export interface province {
-    autoid: number; //自增ID
-    divisioncode: string; //行政代码
-    divisionlevel: string; //行政级别
-    divisionname: string; //行政名称
-    modifierid: number; //修改人
-    modifytime: string; //修改时间
-    parentcode: string; //上级行政代码
-    pathname: string; //路径名称
-    postcode: string; //邮政编码
-    separablename: string; //可拆分的全称
-    shortcode: string; //地区简码
-}
-export interface QueryProvincesAndCities extends HttpRespone {
-    Cities: cities[]; //市
-    Province: province[]; //省
-}
-
-export interface SetHsbyMyPackagesStatus extends HttpRespone {
-    data: string;
-}
-
-export interface queryUserFavoriteGoodses extends HttpRespone {
-    goodsid: number;
-}
-
-export interface QueryUserFavoriteGoodses extends HttpRespone {
-    data: queryUserFavoriteGoodses[];
-}
-
-export interface queryMessageBoard extends HttpRespone {
-    createtime: string;
-    message: string;
-    messageboardid: number;
-    userid: number;
-    contactnum: string;
-}
-
-export interface QueryMessageBoard extends HttpRespone {
-    data: queryMessageBoard[];
-}
-
-export interface GetQrCodeReq {
-    accountId: number;
-    accountName: string;
-    marketId: number;
-    orderNo: string;
-    orderDate: string; //"2020-12-22"
-    totalAmount: number;
-    msgType: string;
-}
-
-export interface GetQrCode {
-    qrCodeId: string;
-    msgType: string;
-    msgSrc: string;
-    errMsg: string;
-    sign: string;
-    mid: string;
-    msgId: string;
-    billDate: string;
-    tid: string;
-    instMid: string;
-    srcReserve: string;
-    responseTimestamp: string;
-    errCode: string;
-    billNo: string;
-    billQRCode: string;
-}
-
-export interface getHsbyMyCount {
-    myCouponCount: number; //我的优惠卷数量
-    myOrderDetailListingCount: number; //我的订单求购中数量
-    myOrderDetailPreCount: number; //我的订单抢购中数量
-    myPackageUnReceiveCount: number; //我的包裹待收货数量
-    myPackageUnSendCount: number; //我的包裹待发货数量
-    myPayOrderCount: number; //我的订单待付款数量
-}
-export interface GetHsbyMyCount extends HttpRespone {
-    data: getHsbyMyCount[];
-}

+ 0 - 69
src/services/http/notice/index.ts

@@ -1,69 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import { getLongTypeLoginID } from '@/services/bus/login';
-import { AxiosPromise } from 'axios';
-import * as Type from './interface';
-import timerUtil from '@/utils/timer/timerUtil';
-import APP from '@/services';
-import moment from 'moment';
-import { queryNoticeRsp } from '@/services/http/notice/interface';
-
-/**
- * 通知公告系统消息查询
- * @param page 页码
- * @param pagesize 每页条数
- * @param loginID 必填 登录账号
- * @param msgType 消息类型 - 1:公告通知 2:系统消息
- * @param onlyUnRead boolean 是否只获取未读信息
- */
-export const queryNotice = (): Promise<string> => {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/Common/QueryNotice'),
-        params: { loginID: Number(getLongTypeLoginID()) },
-    })
-        .then((res) => {
-            if (res.data.data.length) {
-                APP.set(
-                    'noticeInfo',
-                    res.data.data
-                    // res.data.data.sort((a: queryNoticeRsp, b: queryNoticeRsp) => {
-                    //     return new Date(Date(a.createtime)).getTime() - new Date(Date(b.createtime)).getTime();
-                    // })
-                );
-            }
-            return 'ok';
-        })
-        .catch((err: Error) => {
-            throw new Error(`通知公告系统消息查询失败:${err.message}`);
-        });
-};
-
-/**
- * 通知公告设置已读请求
- * @param loginID 登录账号
- * @param noticeID 通知公告ID
- */
-export const queryNoticeReaded = (noticeID: number): AxiosPromise<Type.HttpRespone> => {
-    return request({
-        method: 'post',
-        url: goCommonSearchUrl('/Common/NoticeReaded'),
-        data: { loginID: Number(getLongTypeLoginID()), noticeID },
-    }).catch((err: Error) => {
-        throw new Error(`通知公告设置已读请求失败:${err.message}`);
-    });
-};
-
-/**
- * 通知公告轮询请求
- */
-export const pollingNotice = (): void => {
-    console.log('通知公告轮询请求开始');
-    queryNotice();
-    timerUtil.setInterval(
-        () => {
-            queryNotice();
-        },
-        60000,
-        'pollingNotice'
-    );
-};

+ 0 - 30
src/services/http/notice/interface.ts

@@ -1,30 +0,0 @@
-export interface HttpRespone {
-    code: number;
-    msg: string;
-    page: number;
-    pagesize: number;
-    total: number;
-}
-export interface queryNoticeRsp {
-    auditoruserid: number; //审核人
-    auditremark: string; //审核备注
-    audittime: string; //审核日期
-    autoid: number; //自增ID
-    content: string; //内容
-    createtime: string; //创建时间
-    creatorid: number; //建仓人
-    endtime: string; //结束时间
-    istop: number; //是否置顶 - 0:不置顶 1:置顶
-    msgiconurl: string; //消息图标Url
-    msgtype: number; //消息类型 - 1:公告通知 2:系统消息 3:商品到期提货通知
-    publisher: string; //消息发布者
-    readed: boolean; //是否已读
-    scheduletime: string; //计划发送时间
-    sendtype: number; //推送方式 - 1:全体广播 2:按会员广播 3:个人推送 4:按会员广播(仅会员)
-    sentstatus: number; //推送状态 - 0:未推送 1:已推送 2:审核拒绝
-    title: string; //标题
-    userid: number; //会员/投资者ID推送方式 为 个人时,填写投资者ID
-}
-export interface QueryNoticeRsp extends HttpRespone {
-    data: queryNoticeRsp[];
-}

+ 0 - 78
src/services/http/quote/index.ts

@@ -1,78 +0,0 @@
-import * as type from './interface';
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import APP from '@/services';
-import { QueryHsbyTopGoodsesReponse } from '@/services/http/goodsList/interface';
-import timerUtil from '@/utils/timer/timerUtil';
-
-/**
- * 查询行情历史数据
- * @param param QueryHistoryDatasParam
- */
-export function QueryHistoryDatas(params: type.QueryHistoryDatasParam): Promise<type.QueryHistoryDatasRsp[]> {
-    return request
-        .get(goCommonSearchUrl('/Quote/QueryHistoryDatas'), { params })
-        .then((res) => res.data.data)
-        .catch((err: Error) => {
-            throw new Error('查询行情历史数据错误:' + err.message);
-        });
-}
-
-/**
- * 获取商品盘面信息
- * @param goodsCodes 商品代码列表,格式:CU2102,CU2103,AL2107
- */
-export function QueryQuoteDay(goodsCodes: string): Promise<type.queryQuoteDay[]> {
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/Quote/QueryQuoteDay'),
-        params: { goodsCodes },
-    })
-        .then((res) => res.data.data)
-        .catch((err: Error) => {
-            throw new Error(`获取商品盘面信息 失败:${err.message}`);
-        });
-}
-
-/**
- * 更新盘面
- */
-export async function updateQuoteDay() {
-    const list = APP.get('HsbyListingGoods');
-    const goodsCodes = list.reduce((accumulator: string, currentValue: QueryHsbyTopGoodsesReponse) => {
-        return accumulator + currentValue.goodscode + ',';
-    }, '');
-    const codes = goodsCodes ? goodsCodes.substring(0, goodsCodes.length - 1) : '';
-    if (codes) {
-        // 获取盘面
-        QueryQuoteDay(codes).then((quoteDayInfo) => {
-            APP.set('quoteDayInfo', quoteDayInfo);
-            // 更新价格
-            list.forEach((el: QueryHsbyTopGoodsesReponse) => {
-                const goodscode = el.goodscode;
-                const quoteDay = quoteDayInfo.find((item) => item.goodscode == goodscode);
-                if (quoteDay) {
-                    const { last, presettle } = quoteDay;
-                    // 最新价格没有,用昨结价
-                    if (last) {
-                        el.last = last;
-                    } else if (presettle) {
-                        el.last = presettle;
-                    } else {
-                        console.warn(`商品goodscode: ${goodscode}未获取到盘面最新价和昨结价`);
-                    }
-                } else {
-                    console.warn(`商品goodscode: ${goodscode}未获取到盘面信息`);
-                }
-            });
-            // 获取第一次盘面成功后,开始轮询盘面
-            intervalUpdateQuoteDay();
-        });
-    }
-}
-
-/**
- * 定时更新盘面
- */
-export function intervalUpdateQuoteDay() {
-    timerUtil.setInterval(updateQuoteDay, 5 * 60 * 1000, 'quoteDay');
-}

+ 0 - 159
src/services/http/quote/interface.ts

@@ -1,159 +0,0 @@
-// 周期类型, 0-秒 1: 1分钟 2: 5分钟 3: 30分钟 4: 60分钟 120: 2小时 240: 4小时 11: 日线 10: Tik
-export type CycleType = 0 | 1 | 2 | 3 | 4 | 120 | 240 | 11 | 10;
-export interface QueryHistoryDatasParam {
-    cycleType: CycleType; // 周期类型
-    goodsCode: string; // 商品代码
-    startTime?: string; // 开始时间,格式:yyyy-MM-dd HH:mm:ss
-    endTime?: string; // 结束时间,格式:yyyy-MM-dd HH:mm:ss
-    count?: number; // 条数
-    isAsc?: boolean; // 是否按时间顺序排序(默认为时间倒序排序)
-}
-
-export interface QueryHistoryDatasRsp {
-    c: number; //收盘价
-    h: number; //最高价
-    hv: number; //持仓量
-    l: number; //最低价
-    o: number; //开盘价
-    s: number; //结算价,日线周期(包括)以上才有
-    ts: string; //时间
-    tt: number; //总金额
-    tv: number; //总量
-}
-
-interface HttpRespone {
-    code: number;
-    msg: string;
-    page: number;
-    pagesize: number;
-    total: number;
-}
-
-export interface queryQuoteDay {
-    ask: number; //卖1
-    ask10: number; //卖10
-    ask2: number; //卖2
-    ask3: number; //卖3
-    ask4: number; //卖4
-    ask5: number; //卖5
-    ask6: number; //卖6
-    ask7: number; //卖7
-    ask8: number; //卖8
-    ask9: number; //卖9
-    askorderid: number; //卖单号1
-    askorderid2: number; //卖单号2
-    askorderid3: number; //卖单号3
-    askorderid4: number; //卖单号4
-    askorderid5: number; //卖单号5
-    askordervolume: number; //卖单量1
-    askordervolume10: number; //卖单量10
-    askordervolume2: number; //卖单量2
-    askordervolume3: number; //卖单量3
-    askordervolume4: number; //卖单量4
-    askordervolume5: number; //卖单量5
-    askordervolume6: number; //卖单量6
-    askordervolume7: number; //卖单量7
-    askordervolume8: number; //卖单量8
-    askordervolume9: number; //卖单量9
-    askqueueinfo: string; //大利市卖港股用
-    askvolume: number; //卖量1
-    askvolume10: number; //卖量10
-    askvolume2: number; //卖量2
-    askvolume3: number; //卖量3
-    askvolume4: number; //卖量4
-    askvolume5: number; //卖量5
-    askvolume6: number; //卖量6
-    askvolume7: number; //卖量7
-    askvolume8: number; //卖量8
-    askvolume9: number; //卖量9
-    averageprice: number; //均价
-    bid: number; //买1
-    bid10: number; //买10
-    bid2: number; //买2
-    bid3: number; //买3
-    bid4: number; //买4
-    bid5: number; //买5
-    bid6: number; //买6
-    bid7: number; //买7
-    bid8: number; //买8
-    bid9: number; //买9
-    bidorderid: number; //买单号1
-    bidorderid2: number; //买单号2
-    bidorderid3: number; //买单号3
-    bidorderid4: number; //买单号4
-    bidorderid5: number; //买单号5
-    bidordervolume: number; //买单量1
-    bidordervolume10: number; //买单量10
-    bidordervolume2: number; //买单量2
-    bidordervolume3: number; //买单量3
-    bidordervolume4: number; //买单量4
-    bidordervolume5: number; //买单量5
-    bidordervolume6: number; //买单量6
-    bidordervolume7: number; //买单量7
-    bidordervolume8: number; //买单量8
-    bidordervolume9: number; //买单量9
-    bidqueueinfo: string; //大利市买港股用
-    bidvolume: number; //买量1
-    bidvolume10: number; //买量10
-    bidvolume2: number; //买量2
-    bidvolume3: number; //买量3
-    bidvolume4: number; //买量4
-    bidvolume5: number; //买量5
-    bidvolume6: number; //买量6
-    bidvolume7: number; //买量7
-    bidvolume8: number; //买量8
-    bidvolume9: number; //买量9
-    calloptionpremiums: number; //认购期权1
-    calloptionpremiums2: number; //认购期权2
-    calloptionpremiums3: number; //认购期权3
-    calloptionpremiums4: number; //认购期权4
-    calloptionpremiums5: number; //认购期权5
-    cleartime: number; //清盘时间
-    exchangecode: number; //交易所代码
-    exchangedate: number; //交易日
-    goodscode: string; //商品代码
-    grepmarketprice: number; //暗盘价 港股专用
-    highest: number; //最高价
-    holdincrement: number; //单笔持仓
-    holdvolume: number; //持仓
-    iep: number; //平衡价 港股专用
-    iev: number; //平衡量 港股专用
-    inventory: number; //库存
-    iscleared: number; //是否清盘标志
-    issettled: number; //是否结算标志
-    last: number; //最新价
-    lastlot: number; //最新成交手数
-    lasttime: string; //行情时间(只有现价变化行情时间才变化)
-    lastturnover: number; //最新成交金额
-    lastvolume: number; //最新成交量
-    limitdown: number; //跌停价
-    limitup: number; //涨停价
-    lowest: number; //最低价
-    nontotalholdervolume: number; //非交易持仓量
-    nontotallot: number; //非交易总手数
-    nontotalturnover: number; //非交易总金额
-    nontotalvolume: number; //非交易总量
-    opened: number; //开盘价
-    opentime: string; //开盘时间
-    orderid: number; //序号
-    preclose: number; //昨收
-    preholdvolume: number; //昨持仓
-    presettle: number; //昨结价
-    publictradetype: string; //公共交易标志类型 港股专用
-    putoptionpremiums: number; //认沽期权1
-    putoptionpremiums2: number; //认沽期权2
-    putoptionpremiums3: number; //认沽期权3
-    putoptionpremiums4: number; //认沽期权4
-    putoptionpremiums5: number; //认沽期权5
-    settle: number; //结算价
-    strikeprice: number; //发行价
-    totalaskvolume: number; //内盘
-    totalbidvolume: number; //外盘
-    totallot: number; //总手数
-    totalturnover: number; //总金额
-    totalvolume: number; //总量
-    utclasttime: string; //utc的行情时间
-}
-export interface QuoteDay extends HttpRespone {
-    data: queryQuoteDay[];
-}

+ 0 - 60
src/services/http/system/index.ts

@@ -1,60 +0,0 @@
-import { request, goCommonSearchUrl } from '@/services/request/index';
-import APP from '@/services';
-import moment from 'moment';
-import * as type from './interface';
-import { localStorageUtil } from '@/utils/storage';
-
-/**
- * 获取服务器时间
- */
-export function getServerTime(): Promise<string> {
-    return request
-        .get(goCommonSearchUrl('/Common/GetServerTime'), {})
-        .then((res) => {
-            const time = moment(res.data.data)
-                .utc()
-                .format('YYYY-MM-DD HH:mm:ss');
-            APP.set('systemDate', time);
-            return 'ok';
-        })
-        .catch((err: Error) => {
-            throw new Error('查询行情历史数据错误:' + err.message);
-        });
-}
-
-/**
- * 获取所有枚举信息
- * @param autoid autoid传入后则返回这个ID之后的数据;如不传则返回所有
- */
-export function getAllEnums(autoid?: number): Promise<type.AllEnums[]> {
-    const param = autoid ? { autoid } : {};
-    return request
-        .get(goCommonSearchUrl('/Common/GetAllEnums'), param as Object)
-        .then((res) => {
-            // console.log('res', res.data.data);
-            return res.data.data;
-        })
-        .catch((err: Error) => {
-            throw new Error('查询获取所有枚举信息:' + err.message);
-        });
-}
-
-/**
- * 获取数据库错误信息
- * @param rowNumber 如果传入rowNumber,则返回此rowNumber后的数据
- */
-export function queryErrorInfos(rowNumber?: string): Promise<string> {
-    const param = rowNumber ? { rowNumber } : {};
-    return request
-        .get(goCommonSearchUrl('/Common/QueryErrorInfos'), param as Object)
-        .then((res) => {
-            console.log('res', res.data.data);
-            // IndexedDB.add('ErrorInfos', res.data.data)
-            // IndexedDB 存在 兼容性问题
-            localStorageUtil.setItem('errorCodeInfos', res.data.data);
-            return 'ok';
-        })
-        .catch((err: Error) => {
-            throw new Error('查询获取所有枚举信息:' + err.message);
-        });
-}

+ 0 - 25
src/services/http/system/interface.ts

@@ -1,25 +0,0 @@
-/**
- * 获取服务所有枚举信息
- */
-export interface AllEnums {
-    autoid: number; //自增ID
-    bankmappedvalue: string; //银行服务对应值
-    enumdiccode: string; //所属枚举代码
-    enumdicid: number; //所属枚举ID
-    enumdicname: string; //枚举项名称
-    enumitemname: number; //枚举项值
-    enumitemstatus: number; //枚举项状态 - 1.启用 2.不启用
-    enumitemvalue: string; //通用值 - [币种通用简写]
-    param1: string; //参数1[币种:币种小数位]
-    param2: string; //参数1[币种:币种显示单位]
-    remark: string; //备注
-}
-
-export interface ErrorInfos {
-    description: string; //异常描述
-    errorcode: string; //异常代码
-    errorid: number; //异常ID
-    modulecode: string; //所属模块
-    operatecode: string; //所属操作
-    rownumber: string; //行号
-}

+ 0 - 129
src/services/http/user/index.ts

@@ -1,129 +0,0 @@
-import { request, goCommonSearchUrl, commonSearchUrl } from '@/services/request/index';
-import { sha256 } from 'js-sha256';
-import { getUserId } from '@/services/bus/account';
-import { UserInfoReq } from './interface';
-
-/**
- * 统一查询用户登录账号
- */
-export const queryLoginAccount = (logidCode: String): Promise<string> => {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'get',
-            url: goCommonSearchUrl('/User/GetLoginID'),
-            params: { username: logidCode },
-        })
-            .then((value) => {
-                console.log(value);
-                resolve(value.data.data);
-            })
-            .catch((err) => {
-                console.log(err);
-                reject(err.message);
-            });
-    });
-};
-
-/**
- * 请求验证码
- */
-export const querySmsvcode = (mobile: String): Promise<string> => {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'post',
-            url: commonSearchUrl('/user/smsvcode'),
-            data: { mobile },
-        })
-            .then((value) => {
-                if (value.data.success === 'true') {
-                    resolve(value.data);
-                } else {
-                    reject(value.data);
-                }
-            })
-            .catch((err) => reject(err));
-    });
-};
-
-/**
- * 拿登录id
- */
-export const queryLoginInfo = (mobile: String, vcode: String): Promise<string> => {
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'post',
-            url: commonSearchUrl('/tradeoperation/querylogininfo'),
-            data: { mobile, vcode },
-        })
-            .then((value) => {
-                if (value.data.code === '0') {
-                    resolve(value.data.resultset);
-                } else {
-                    reject(value.data.message);
-                }
-            })
-            .catch((err) => reject(err));
-    });
-};
-
-/**
- * 改密码
- */
-export const queryResetpwdbycardnum = (mobile: String, vcode: String, pwd: String, loginid: String): Promise<string> => {
-    const password = sha256.hex(`${loginid}${pwd}`);
-    console.log('password', password);
-    return new Promise((resolve, reject) => {
-        request({
-            method: 'post',
-            url: commonSearchUrl('/tradeoperation/resetpwdbycardnum'),
-            data: { mobile, vcode, password },
-        })
-            .then((value: any) => {
-                console.log(value);
-                if (value.data.code === '500') {
-                    reject(value.data.message);
-                } else {
-                    resolve(value.data.message);
-                }
-            })
-            .catch((err) => reject(err));
-    });
-};
-
-/**
- * 获取用户实名认证状态
- * @returns
- */
-export function GetUserAuthStatus(): Promise<boolean> {
-    const params = { userID: getUserId() };
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/User/GetUserAuthStatus'),
-        params,
-    })
-        .then((value: any) => {
-            return value.data.data;
-        })
-        .catch((err) => Promise.reject('获取用户实名认证状态失败:' + err.message));
-}
-
-/**
- * 获取用户信息
- * @returns
- */
-export function QueryUserInfo(): Promise<UserInfoReq> {
-    const params = {
-        userID: getUserId(),
-        isDecrypt: true,
-    };
-    return request({
-        method: 'get',
-        url: goCommonSearchUrl('/User/QueryUserInfo'),
-        params,
-    })
-        .then((value: any) => {
-            console.log(value);
-            return value.data.data;
-        })
-        .catch((err) => Promise.reject('获取用户信息' + err.message));
-}

+ 0 - 62
src/services/http/user/interface.ts

@@ -1,62 +0,0 @@
-// 修改账户密码请求
-export interface ModifyPwdByPhoneReq {
-    mobile: string; //手机
-    vcode: string; //验证码
-    password: string; //密码
-    confirmPass?: string; //确认密码
-}
-
-// 用户信息
-export interface UserInfoReq {
-    address	:string;//地址
-    attachment1	:string;//附件1
-    attachment2	:string;//附件2
-    bankaccount	:string;//银行帐号 (加密存储)
-    bankaccountname	:string;//收款人名称
-    bankcardfrontphotourl	:string;//银行卡正面照地址
-    bankid	:string;//银行编码
-    bankname	:string;//银行名称
-    biznature	:number;//企业性质( 企业) - 1:国有控股企业 2:集体控股企业 3:私人控股企业 4:港澳台商控股企业 5:外商控股企业 6:其它
-    bizscope	:string;//企业经营范围(企业)
-    cardbackphotourl	:string;//证件背面图片地址
-    cardfrontphotourl	:string;//证件正面图片地址
-    cardnum	:string;//证件号码(加密存储)
-    cardtypeid	:number;//证件类型ID
-    cityid	:number;//市
-    company	:string;//公司(个人)
-    contactname	:string;//联系人
-    countryid	:number;//国家
-    createtime	:string;//创建时间
-    creatorid	:number;//创建人
-    customername	:string;//客户名称(企业名称)
-    districtid	:number;//地区
-    email	:string;//邮件(加密存储)
-    fax	:string;//传真(加密存储)
-    halfbodyphotourl	:string;//半身照地址
-    hasencrypt	:number;//数据是否已加密 - 0:未加密 1:已加密
-    headurl	:string;//头像地址
-    legalcardbackphotourl	:string;//法人身份证背面照地址
-    legalcardfrontphotourl	:string;//法人身份证正面照地址
-    legalpersonname	:string;//法人姓名(企业)
-    mobile	:string;//手机号码(加密存储)
-    mobile2	:string;//手机号码[明文-尚志]
-    modifierid	:number;//修改人
-    modifiertime	:string;//修改时间
-    needinvoice	:number;//是否需要发票 - 0:不需要 1:需要
-    nickname	:string;//昵称:默认为名称脱敏(张) 或 手机号脱敏(1399999)
-    openmode	:number;//开户方式 - 1:管理端开户 2:网上开户注册(会员官网) 3:微信开户 4:网页交易端注册 5:安卓手机端注册 6:苹果手机端注册 7:PC交易端注册 8:微信快速开户 9:支付宝快速开户 10:手机号快速开户
-    otherurl	:string;//其它图片地址[使用分号分隔]
-    postalcode	:string;//邮政编码
-    provinceid	:number;//省
-    qq	:string;//QQ(加密存储
-    remark	:string;//备注
-    sex	:number;//用户性别 0: 女 1: 男
-    signpdfurl	:string;//签约pdf文件
-    telphone	:string;//联系电话(加密存储)
-    userid	:number;//用户ID
-    userinfotype	:number;//用户信息类型 - 1:个人 2:企业
-    userstatus	:number;//用户状态 - 1:正常 2:注销
-    usertype	:number;//账户类型 - 1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户
-    wechat	:string;//微信(加密存储)
-    wskhinfo	:string;//开户申请信息(JSON)
-}

+ 7 - 7
src/services/socket/quota/adapter/index.ts

@@ -1,13 +1,13 @@
-import { subscribeInfosToByteArrary, byteArrayToUInt } from './byteUtils';
+import APP from '@/services';
+import { getLongTypeLoginID, isLogin } from '@/services/bus/login';
 import { getToken } from '@/services/bus/token';
-import { isLogin, getLongTypeLoginID } from '@/services/bus/login';
-import { subscribeInfoType } from '../interface';
-import { Package40 } from '@/utils/websocket/package';
 import { funCode } from '@/services/funcode/index';
-import APP from '@/services';
-import { queryQuoteDay } from '@/services/http/quote/interface';
+import { QueryQuoteDayRsp } from '@/services/go/quote/interface';
 import { mergeObjSameProperty } from '@/utils/objHandle';
+import { Package40 } from '@/utils/websocket/package';
 import Long from 'long';
+import { subscribeInfoType } from '../interface';
+import { byteArrayToUInt, subscribeInfosToByteArrary } from './byteUtils';
 
 /**
  * 构建行情订阅请求包
@@ -118,7 +118,7 @@ export function parseReceivePush(quotationData: any) {
             setQuoteTikFieldByByte(goodsQuoteTik, key, value);
         }
         const quoteDayInfo = APP.getRef('quoteDayInfo');
-        const itemQuote = quoteDayInfo.value.find((el: queryQuoteDay) => el.goodscode === goodsQuoteTik.goodscode);
+        const itemQuote = quoteDayInfo.value.find((el: QueryQuoteDayRsp) => el.goodscode === goodsQuoteTik.goodscode);
         if (itemQuote) {
             // 注意:此处已 go 服务查询出来的盘面数据为基准,查询盘面 先修改成go 服务,第一次进入项目时候回查询一次所有盘面
             // 之前是 通过 websocket 查询的,故 可能存在字段发生变化问题,如遇到,则进行优化处理

+ 17 - 33
src/views/home.vue

@@ -1,43 +1,27 @@
 <template>
-    <div class="home">
-        首页
-    </div>
+  <div class="home">
+    首页
+  </div>
 </template>
 
 <script lang="ts">
-    import { defineComponent, ref, provide } from 'vue';
-    import { queryClientFixedADConfigs } from '@/services/http/advert/index';
-    import { advert } from '@/services/dataCenter/interface';
-    import { initData } from '@/common/methods';
+import { defineComponent } from 'vue';
 
-    // 获取该组件需要的数据
-    const useData = () => {
-        const list = ref<Array<advert.fixedADConfigs> | []>([]);
-        provide('home-images-wrap', list);
-        // 获取轮播图
-        initData(() => {
-            queryClientFixedADConfigs().then((res) => {
-                console.log('获取轮播图', res);
-
-                list.value = res.data.data;
-            });
-        });
-    };
-    export default defineComponent({
-        name: 'home',
-        components: {},
-        setup() {
-            return {};
-        },
-    });
+export default defineComponent({
+    name: 'home',
+    components: {},
+    setup() {
+        return {};
+    },
+});
 </script>
 
 <style lang="less">
-    .home {
-        .withus {
-            cursor: pointer;
-            margin-top: 35px;
-            padding-bottom: 25px;
-        }
+.home {
+    .withus {
+        cursor: pointer;
+        margin-top: 35px;
+        padding-bottom: 25px;
     }
+}
 </style>

+ 1 - 1
src/views/information/custom/list/setup.ts

@@ -1,4 +1,4 @@
-import { ColumnType, getTableHead } from '@/services/bus/table';
+import { ColumnType, getTableHead } from '@/common/methods/table';
 import { QueryCustomInfo } from '@/services/go/ermcp/customInfo';
 import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { QueryCustomInfoEnum } from '@/services/go/ermcp/customInfo/type';

+ 1 - 1
src/views/information/spot-contract/list/setup.ts

@@ -1,7 +1,7 @@
+import { ColumnType, getTableHead } from '@/common/methods/table';
 import { OperationTabMenu } from '@/services/go/commonService/interface';
 import { QuerySpotContract } from '@/services/go/ermcp/spot-contract/index';
 import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
-import { ColumnType, getTableHead } from '@/services/bus/table';
 import { message } from 'ant-design-vue';
 import { inject, Ref, ref } from 'vue';
 

+ 93 - 87
src/views/information/warehouse-info/list/normal-use/index.vue

@@ -1,109 +1,115 @@
 <template>
-    <!-- 仓库信息: 正常 -->
-    <div class="warehouse-info-normal">
-        <filterCustomTable @search="search">
-            <a-button class="operBtn" @click="openAction">新增</a-button>
-        </filterCustomTable>
-        <a-table class="topTable" :columns="columns" :pagination="false" rowKey="key" :data-source="wareHouseInfos" />
-    </div>
+  <!-- 仓库信息: 正常 -->
+  <div class="warehouse-info-normal">
+    <filterCustomTable @search="search">
+      <a-button class="operBtn"
+                @click="openAction">新增</a-button>
+    </filterCustomTable>
+    <a-table class="topTable"
+             :columns="columns"
+             :pagination="false"
+             rowKey="key"
+             :data-source="wareHouseInfos" />
+  </div>
 </template>
 
 <script lang="ts">
-    import { computed, defineComponent, ref } from 'vue';
+import { computed, defineComponent, ref } from 'vue';
 
-    import { initData } from '@/common/methods';
-    import filterCustomTable from '@/views/information/warehouse-info/compoments/filterTable/index.vue';
-    import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
-    import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
-    import { message } from 'ant-design-vue';
-    import { getTableHead } from '@/services/bus/table';
-    import { getUserId } from '@/services/bus/account';
+import { initData } from '@/common/methods';
+import filterCustomTable from '@/views/information/warehouse-info/compoments/filterTable/index.vue';
+import { QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
+import { ErmcpWareHouseInfo } from '@/services/go/ermcp/warehouse-info/interface';
+import { message } from 'ant-design-vue';
+import { getTableHead } from '@/common/methods/table';
+import { getUserId } from '@/services/bus/account';
 
-    // 查询客户资料列表
-    function getWarehouseInfoList() {
+// 查询客户资料列表
+function getWarehouseInfoList() {
+    interface ColumnType {
+        key: string;
+        dataIndex: string;
+        title: string;
+        onFilter?: Function;
+        sorter?: Function;
+    }
+
+    // 仓库数据
+    const wareHouseInfos = ref<ErmcpWareHouseInfo[]>([]);
+    // 列头
+    const columns = ref<ColumnType[]>([]);
+    // 过滤
+    const filteredInfo = ref();
+
+    // 获取表头
+    function getColumns() {
         interface ColumnType {
             key: string;
             dataIndex: string;
             title: string;
+            filteredValue?: string | null;
             onFilter?: Function;
             sorter?: Function;
         }
+        const list = getTableHead('table_pcweb_warehouse');
+        console.log('list', list);
 
-        // 仓库数据
-        const wareHouseInfos = ref<ErmcpWareHouseInfo[]>([]);
-        // 列头
-        const columns = ref<ColumnType[]>([]);
-        // 过滤
-        const filteredInfo = ref();
-
-        // 获取表头
-        function getColumns() {
-            interface ColumnType {
-                key: string;
-                dataIndex: string;
-                title: string;
-                filteredValue?: string | null;
-                onFilter?: Function;
-                sorter?: Function;
-            }
-            const list = getTableHead('table_pcweb_warehouse');
-            console.log('list', list);
-
-            const filtered = filteredInfo.value || {};
-            columns.value.length = 0;
-            list.forEach((e, i) => {
-                const { columnfield, columntitle } = e;
-                const item: ColumnType = {
-                    key: String(i),
-                    dataIndex: columnfield,
-                    title: columntitle,
-                };
-                columns.value.push(item);
-            });
-            console.log('columns', columns);
-        }
-
-        // 获取仓库信息
-        const wareHouseInfoList = ref<ErmcpWareHouseInfo[]>([]);
-        function actionQuery() {
-            const reqParam = { userid: getUserId(), status: '1' };
-            QueryWareHouse(reqParam)
-                .then((res) => {
-                    wareHouseInfos.value = res.map((e, i) => {
-                        return { ...e, key: String(i) };
-                    });
-                    console.log('查询仓库列表', wareHouseInfos);
-                })
-                .catch((err) => message.error(err));
-        }
-        // 查询
-        function search(value: any) {}
-
-        return { wareHouseInfos, actionQuery, columns, getColumns, search };
+        const filtered = filteredInfo.value || {};
+        columns.value.length = 0;
+        list.forEach((e, i) => {
+            const { columnfield, columntitle } = e;
+            const item: ColumnType = {
+                key: String(i),
+                dataIndex: columnfield,
+                title: columntitle,
+            };
+            columns.value.push(item);
+        });
+        console.log('columns', columns);
     }
 
-    // 新增
-    function add() {
-        console.log('add');
+    // 获取仓库信息
+    const wareHouseInfoList = ref<ErmcpWareHouseInfo[]>([]);
+    function actionQuery() {
+        const reqParam = { userid: getUserId(), status: '1' };
+        QueryWareHouse(reqParam)
+            .then((res) => {
+                wareHouseInfos.value = res.map((e, i) => {
+                    return { ...e, key: String(i) };
+                });
+                console.log('查询仓库列表', wareHouseInfos);
+            })
+            .catch((err) => message.error(err));
     }
+    // 查询
+    function search(value: any) {}
+
+    return { wareHouseInfos, actionQuery, columns, getColumns, search };
+}
+
+// 新增
+function add() {
+    console.log('add');
+}
 
-    export default defineComponent({
-        name: 'warehouse-info-normal',
-        components: {
-            filterCustomTable,
-        },
-        setup() {
-            const { wareHouseInfos, actionQuery, columns, getColumns, search } = getWarehouseInfoList();
-            initData(() => {
-                actionQuery();
-                getColumns();
-            });
-            return { wareHouseInfos, add, columns, search };
-        },
-    });
+export default defineComponent({
+    name: 'warehouse-info-normal',
+    components: {
+        filterCustomTable,
+    },
+    setup() {
+        const { wareHouseInfos, actionQuery, columns, getColumns, search } = getWarehouseInfoList();
+        initData(() => {
+            actionQuery();
+            getColumns();
+        });
+        return { wareHouseInfos, add, columns, search };
+    },
+});
 </script>
 
 <style lang="less">
-    .warehouse-info-normal {
-    }</style
+.warehouse-info-normal {
+}
+</style
 >;