jbzfilmsdk
Advanced tools
Comparing version 1.1.0-beta7 to 1.1.1-beta1
@@ -0,0 +0,0 @@ # jbzfilmsdk changelog |
{ | ||
"name": "jbzfilmsdk", | ||
"version": "1.1.0-beta7", | ||
"version": "1.1.1-beta1", | ||
"description": "jinbaozheng film sdk", | ||
@@ -12,3 +12,5 @@ "main": "lib/index.js", | ||
"example": "rollup -c --watch --config example/rollup.config.js", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"make-doc": "typedoc --tsconfig docconfig.json", | ||
"update-docs": "node ./publish_doc.js" | ||
}, | ||
@@ -27,4 +29,4 @@ "repository": { | ||
"@babel/runtime": "^7.1.5", | ||
"axios": "^0.18.0", | ||
"icemilk": "1.0.9-beta11", | ||
"axios": "^0.18.1", | ||
"icemilk": "1.0.10-beta0", | ||
"jsencrypt": "^3.0.0-rc.1", | ||
@@ -49,2 +51,4 @@ "md5": "^2.2.1" | ||
"tslib": "^1.9.3", | ||
"typedoc": "^0.15.0", | ||
"typedoc-plugin-no-inherit": "^1.1.9", | ||
"typescript": "^3.2.1" | ||
@@ -51,0 +55,0 @@ }, |
@@ -0,0 +0,0 @@ # jbzfilmsdk |
@@ -0,0 +0,0 @@ /** |
@@ -15,2 +15,3 @@ /** | ||
import JNetworkOther from './network/JNetworkOther'; | ||
import JNetworkActivity from './network/JNetworkActivity'; | ||
import JNetworkWorker from './network/JNetworkWorker'; | ||
@@ -30,2 +31,3 @@ import {revealNetwork, configPicker} from "./network/JNetworkWorker"; | ||
JNetworkOther, | ||
JNetworkActivity, | ||
JNetworkWorker, | ||
@@ -32,0 +34,0 @@ revealNetwork, |
@@ -0,0 +0,0 @@ import RootModel, {fillProperty} from "./RootModel"; |
@@ -0,0 +0,0 @@ import {default as RootModel, fillProperty} from "./RootModel"; |
@@ -0,0 +0,0 @@ import {default as RootModel, fillProperty} from "./RootModel"; |
@@ -0,0 +0,0 @@ import {default as RootModel, fillProperty} from "./RootModel"; |
@@ -0,0 +0,0 @@ import RootModel, {fillProperty} from "./RootModel"; |
@@ -0,0 +0,0 @@ import {fillProperty, default as RootModel} from "./RootModel"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export default class RootModel { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ import JNetworkWorker, {revealNetwork} from './JNetworkWorker'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -1,4 +0,5 @@ | ||
import {JNetwork, INetworkStandardPromiseType, JNetworkGroup} from 'icemilk'; | ||
import {JNetwork, INetworkStandardPromiseType, JNetworkGroup, JToolObject} from 'icemilk'; | ||
import JConfig from '../unify/JConfig'; | ||
import JEncryptionTool from './../util/JEncryptionTool'; | ||
const BUS_GW = '/bus/gw'; | ||
@@ -18,4 +19,4 @@ const DEFAULT_NETWORK_CONFIG = { | ||
rule: [0, 1, 2], | ||
encryption: true | ||
} | ||
encryption: null | ||
}; | ||
let _config: object = JConfig; | ||
@@ -57,14 +58,2 @@ export default class JNetworkWorker extends JNetwork{ | ||
// export const needSecret = (isNeed: boolean | (() => boolean)) => { | ||
// _config['DEF...']['encryption'] = isNeed | ||
// } | ||
// | ||
// needSecret(function () { | ||
// if (sdasdaw) | ||
// return true | ||
// else | ||
// return false | ||
// }) | ||
export const revealNetwork = function<T extends new(...args: any[]) => JNetworkWorker>(networkClass: T, networkName: string = networkClass.name, config?: object): T{ | ||
@@ -80,3 +69,3 @@ if (!JNetworkWorker.isPrototypeOf(networkClass)){ | ||
...(config ? config['DEFAULT_NETWORK_CONFIG'] : _config['DEFAULT_NETWORK_CONFIG']) | ||
} | ||
}; | ||
if (!classConfig){ | ||
@@ -98,7 +87,7 @@ if (config){ | ||
let hasKey = injectFrom.some(_ => { | ||
if (typeof _ === "string"){ | ||
if (typeof _ === "string"){ | ||
return _ === key; | ||
} | ||
if (typeof _ === "object"){ | ||
if (typeof _ === "object"){ | ||
return _.hasOwnProperty(key) | ||
@@ -131,3 +120,3 @@ } | ||
return r; | ||
} | ||
}; | ||
@@ -174,6 +163,11 @@ for (let key in classConfig) { | ||
for (let i = 0; i < book.length; i++){ | ||
let page = book[i]; | ||
let isOptional = /^.*\?$/.test(page); | ||
if (isOptional){ | ||
page = page.slice(0, -1) | ||
} | ||
for (let j = 0; j < 3; j++){ | ||
let valueObj: object = [params, bodyData, headers][rule[j]]; | ||
if (valueObj.hasOwnProperty(book[i])){ | ||
networkArgs[j][book[i]] = args[i]; | ||
const valueObj: object = [params, bodyData, headers][rule[j]]; | ||
if (valueObj.hasOwnProperty(page)){ | ||
networkArgs[j][page] = args[i]; | ||
} | ||
@@ -195,7 +189,17 @@ } | ||
}, useHeaders, url); | ||
if (encryption){ | ||
let b = this.config.inType; | ||
let paramsObj = JEncryptionTool.encryption(url, paramsValue, b); | ||
if (encryption && JToolObject.getObjOrFuncResult(encryption.required)){ | ||
const {inType} = this.otherContent || {inType: undefined}; | ||
if (!inType){ | ||
throw new Error('Not found inType property, Do you forget config inType value in otherContent?'); | ||
} | ||
let noUndefinedParams = {}; | ||
for (const key in paramsValue){ | ||
if (paramsValue.hasOwnProperty(key) && paramsValue[key] !== undefined){ | ||
noUndefinedParams[key] = paramsValue[key] | ||
} | ||
} | ||
const {paramsInterceptor = (_) => ({location: '02'})} = encryption; | ||
let paramsObj = JEncryptionTool.encryption(url, paramsInterceptor(noUndefinedParams, this), inType); | ||
if (!paramsObj){ | ||
throw new Error(`url参数出错`); | ||
throw new Error(`地址 ${url} 加密过程异常`); | ||
} | ||
@@ -211,3 +215,3 @@ url = BUS_GW; | ||
headers: headersValue | ||
} | ||
}; | ||
return this | ||
@@ -217,5 +221,5 @@ .createGroup({ | ||
}) | ||
.useParams(...useParams) | ||
.useHeaders(...useHeaders) | ||
.useBodyData(...useBodyData) | ||
.useParams(...useParams, ...this.extraParams) | ||
.useHeaders(...useHeaders, ...this.extraHeaders) | ||
.useBodyData(...useBodyData, ...this.extraBodyData) | ||
.fetchRequest(method, this.baseUrl, url, paramsValue, bodyDataValue, headersValue) | ||
@@ -222,0 +226,0 @@ .then((data) => cook(precook(data, pizza), pizza)); |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import CityModel from "../model/CityModel"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -11,2 +11,4 @@ import JNetworkAccount from './JNetworkAccount'; | ||
import JNetworkOther from './JNetworkOther'; | ||
import JNetworkActivity from './JNetworkActivity'; | ||
import JNetworkWorker from "../network/JNetworkWorker"; | ||
@@ -26,3 +28,6 @@ const DEFAULT_NETWORK_CONFIG: object = { | ||
rule: [0, 1, 2], | ||
encryption: true | ||
encryption: { | ||
required: () => true, | ||
paramsInterceptor: (params, self: JNetworkWorker) => ({...params, ...self.pickInjectParams()}) | ||
} | ||
}; | ||
@@ -41,3 +46,4 @@ | ||
JNetworkOther, | ||
JNetworkActivity, | ||
DEFAULT_NETWORK_CONFIG | ||
}; |
const JNetworkAccount = { | ||
accountLogin: { | ||
url: '/account/login', | ||
systemLogin: { | ||
url: '/system/login', | ||
params: { | ||
mobile: true, | ||
password: true | ||
}, | ||
book: [ | ||
'mobile', | ||
'password' | ||
] | ||
}, | ||
accountLogout: { | ||
url: '/account/logout', | ||
headers: { | ||
sessionId: true | ||
}, | ||
book: [ | ||
'sessionId' | ||
] | ||
}, | ||
accountVerifyCode: { | ||
url: '/account/verifycode', | ||
params: { | ||
mobile: true, | ||
codetype: true | ||
}, | ||
book: [ | ||
'mobile', | ||
'codetype' | ||
] | ||
}, | ||
accountRegister: { | ||
url: '/account/register', | ||
params: { | ||
mobile: true, | ||
verifyCode: true, | ||
password: true | ||
}, | ||
book: [ | ||
'mobile', | ||
'verifyCode', | ||
'password' | ||
] | ||
}, | ||
accountUpdatepass: { | ||
url: '/account/updatepass', | ||
params: { | ||
mobile: true, | ||
verifyCode: true, | ||
password: true | ||
}, | ||
book: [ | ||
'mobile', | ||
'verifyCode', | ||
'password' | ||
] | ||
}, | ||
SystemEncrypt: { | ||
url: '/cmbc/encrypt', | ||
params: { | ||
key:true | ||
@@ -67,20 +10,2 @@ }, | ||
] | ||
}, | ||
SystemDecrypt: { | ||
url: '/cmbc/decrypt', | ||
params: { | ||
key:true | ||
}, | ||
book: [ | ||
'key' | ||
] | ||
}, | ||
SystemLogin: { | ||
url: '/cmbc/login', | ||
params: { | ||
key:true | ||
}, | ||
book: [ | ||
'key' | ||
] | ||
} | ||
@@ -87,0 +12,0 @@ }; |
@@ -13,3 +13,3 @@ function _netBanner(banner) { | ||
'location', | ||
'cityId' | ||
'cityId?' | ||
], | ||
@@ -16,0 +16,0 @@ cook: _=>_.map(_netBanner) |
@@ -29,8 +29,7 @@ import {JToolDate} from 'icemilk' | ||
params: { | ||
cinemaId: true, | ||
openId: false, | ||
cinemaId: true | ||
}, | ||
book: [ | ||
'openId', | ||
'cinemaId' | ||
'cinemaId', | ||
] | ||
@@ -44,3 +43,6 @@ }, | ||
latitude: true, | ||
orderType: true, | ||
orderType: { | ||
required: false, | ||
default: 2 | ||
}, | ||
regionName: false, | ||
@@ -53,14 +55,2 @@ filmId: false, | ||
}, | ||
book: [ | ||
'cityId', | ||
'longitude', | ||
'latitude', | ||
'orderType', | ||
'regionName', | ||
'filmId', | ||
'feature', | ||
'page', | ||
'size', | ||
'date' | ||
], | ||
cook: _ => _.map(_netcinema) | ||
@@ -72,3 +62,2 @@ }, | ||
cinemaId: true | ||
}, | ||
@@ -134,4 +123,3 @@ book: [ | ||
book: [ | ||
'requestId', | ||
'type' | ||
'requestId' | ||
], | ||
@@ -138,0 +126,0 @@ cook: (_) => { |
import {JToolObject as ObjectTool} from "icemilk"; | ||
import CityModel from "../model/CityModel"; | ||
import DistrictModel from "../model/DistrictModel"; | ||
@@ -3,0 +5,0 @@ function _netCityToCity(city) { |
@@ -5,6 +5,5 @@ import FilmModel from '../model/FilmModel'; | ||
const JNetworkFilm = { | ||
filmHotfilms: { | ||
hotFilms: { | ||
url: '/film/hotfilms', | ||
cook: data => { | ||
console.log(data) | ||
let films = data.films.map(_ => FilmModel.create(_)) | ||
@@ -14,3 +13,3 @@ return {count: data.count, films}; | ||
}, | ||
hotFilmsPage: { | ||
hotFilmsByPage: { | ||
url: '/film/hotfilmspage', | ||
@@ -27,6 +26,5 @@ params: { | ||
}, | ||
filmWaitfilms: { | ||
waitFilms: { | ||
url: '/film/soonfilms', | ||
cook: data => { | ||
console.log(data) | ||
let films = data.films.map(_ => FilmModel.create(_)) | ||
@@ -36,3 +34,3 @@ return {count: data.count, films}; | ||
}, | ||
soonFilmsPage: { | ||
waitFilmsByPage: { | ||
url: '/film/soonfilmspage', | ||
@@ -49,3 +47,3 @@ params: { | ||
}, | ||
filmFilm: { | ||
filmDetail: { | ||
url: '/film/film', | ||
@@ -52,0 +50,0 @@ params: { |
@@ -0,1 +1,5 @@ | ||
/* | ||
* 优化代码标准模板 | ||
* */ | ||
import CityModel from '../model/CityModel'; | ||
@@ -2,0 +6,0 @@ import DistrictModel from "../model/DistrictModel"; |
const JNetworkMine = { | ||
celCltCinema: { | ||
cancelCollectCinema: { | ||
url: '/mine/celcltcinema', | ||
@@ -9,7 +9,6 @@ params: { | ||
book: [ | ||
'openId', | ||
'cinemaId' | ||
] | ||
}, | ||
cltCinema: { | ||
collectCinema: { | ||
url: '/mine/cltcinema', | ||
@@ -20,12 +19,11 @@ params: { | ||
cinemaName: true, | ||
cinemaAddress: true | ||
cinemaAddress: true, | ||
}, | ||
book: [ | ||
'openId', | ||
'cinemaId', | ||
'cinemaName', | ||
'cinemaAddress' | ||
'cinemaAddress', | ||
] | ||
}, | ||
cltEdCinemaList: { | ||
collectedCinemaList: { | ||
url: '/mine/cltedcinemalist', | ||
@@ -35,8 +33,7 @@ params: { | ||
page: true, | ||
size: false | ||
size: false, | ||
}, | ||
book: [ | ||
'openId', | ||
'page', | ||
'size' | ||
'size?', | ||
] | ||
@@ -50,23 +47,10 @@ }, | ||
size: true, | ||
type: false | ||
}, | ||
book: [ | ||
'openId', | ||
'page', | ||
'size', | ||
'type' | ||
'type?', | ||
] | ||
}, | ||
orderDelete: { | ||
url: '/mine/cancelorder', | ||
params: { | ||
openId: true, | ||
orderId: true | ||
}, | ||
book: [ | ||
'openId', | ||
'orderId', | ||
] | ||
}, | ||
orderDetail: { | ||
@@ -77,6 +61,4 @@ url: '/mine/orderdetail', | ||
orderId: true, | ||
}, | ||
book: [ | ||
'openId', | ||
'orderId', | ||
@@ -92,4 +74,3 @@ ] | ||
book: [ | ||
'openId', | ||
'orderId' | ||
'orderId', | ||
] | ||
@@ -96,0 +77,0 @@ } |
const JNetworkOther = { | ||
decrypt: { | ||
url: '/system/decrypt', | ||
systemEncrypt: { | ||
url: '/system/encrypt', | ||
params: { | ||
key: true | ||
key:true | ||
}, | ||
@@ -11,6 +11,6 @@ book: [ | ||
}, | ||
encrypt: { | ||
url: '/system/encrypt', | ||
systemDecrypt: { | ||
url: '/system/decrypt', | ||
params: { | ||
key: true | ||
key:true | ||
}, | ||
@@ -21,13 +21,4 @@ book: [ | ||
}, | ||
login: { | ||
url: '/system/login', | ||
params: { | ||
key: true | ||
}, | ||
book: [ | ||
'key' | ||
] | ||
} | ||
} | ||
export default JNetworkOther; |
const JNetworkSearch = { | ||
hotQuery: { | ||
hotSearchList: { | ||
url: '/search/hotQuery' | ||
}, | ||
searchAll: { | ||
search: { | ||
url: '/search/searchall', | ||
params: { | ||
cityId: true, | ||
key: true, | ||
longitude: true, | ||
latitude: true, | ||
page: true, | ||
size: false | ||
cityId: true, | ||
longitude: true, | ||
latitude: true, | ||
key: true, | ||
page: true, | ||
size: false | ||
}, | ||
book: [ | ||
'cityId', | ||
'key', | ||
'longitude', | ||
'latitude', | ||
'page', | ||
'size' | ||
'key', | ||
'page', | ||
'size?' | ||
], | ||
@@ -23,0 +20,0 @@ description: 'cinema 无数据' |
@@ -30,4 +30,4 @@ const JNetworkTrade = { | ||
}, | ||
getOrderResult: { | ||
url: '/cmbc/status', | ||
orderStatus: { | ||
url: '/system/status', | ||
params: { | ||
@@ -40,4 +40,4 @@ payNo:true | ||
}, | ||
cmbcConfirmPay: { | ||
url: '/cmbc/confirm/pay', | ||
confirmPay: { | ||
url: '/system/confirm/pay', | ||
params: { | ||
@@ -48,5 +48,5 @@ _CallBackUrl:false, | ||
} | ||
} | ||
}, | ||
} | ||
export default JNetworkTrade; |
@@ -5,3 +5,3 @@ import md5 from 'md5'; | ||
// const SI_YAO = 'MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALSnsdho6o2T1qJ0gmVgw6FMeNNZ0tcJQHYu8x6rQEfnJgjiYa78DfzPWz3wLUlbB/jGcAV8Eff51Z9Se2yM16D4kMgQavCEkAlHzhk3kgnLxaUduvKB/DjT8dDzT1UY2w5vx8VEGnHSFX+SifbIfCIj9FNUZWJx5eYTQqzD6Ms1AgMBAAECgYBPqqgmHFZbave7GpAqbtq2tgeOhM0S4VSZCalTPAgT7V57ioGzbhopA7RkAxelgsxoK/JYqNcvuPA422Hsg8vOxj55EYfT9C0cP0IeCnc74r1nyWIobBFDy0j7j48ktW20/nd4WwUGOkRpbmuHiawGUjH4XCmUpG5GVCWbDdKynQJBANnJ8G3tUcUrSnfx9kZfpcqrfuA33NL0Rv2a7AXQxNus7Rc0/yHje9JYDj3TpybSDhzQ47u1bj41G1Y2k70AmP8CQQDUWeEjnvlxX40JXJcLngcfEw72ussUxBPGjEOWJCGrqQCUULR8Cd0SCyDk/R7ydeEO2dugE0UDAjugsaYTP4fLAkAoMYOk1fqUV+P7dPVNkZNobvQQb17as+hyH2hVvmzGWgi7krVPTMtqS4P9VxVvLa8bFFYjK124L1bnN1VWuUiDAkAxd7ql1KvhSFQPoT0inK6mA4eR3JPgg4jj0NsRx9r8JUOYSXCyEI4qXONN1NV3wBQspH2wPazu9X80gQ3iIAOfAkEAkAzm56WIq+c7i5W/GLzqjlbFtlYAk8NKMyZX5Od4yjtFREslWeC78YtvzB5dkXbdakq0PLTrmKGhTrhui+VyIg=='; | ||
let jsencrypt_1 = require('jsencrypt'); | ||
import jsencrypt_1 from 'jsencrypt'; | ||
const b64map = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | ||
@@ -39,7 +39,11 @@ const b64pad = '='; | ||
'/order/cancel': 'M10065',//取消订单 | ||
'/cmbc/encrypt': 'M10080',//民生加密 | ||
'/cmbc/decrypt': 'M10081',//民生解密 | ||
'/cmbc/login': 'M10082',//民生登录 | ||
'/cmbc/status': 'M10083',//民生支付状态查询 | ||
'/cmbc/confirm/pay': 'M10084',//民生确认支付 | ||
'/system/encrypt': 'M10080',//民生加密 | ||
'/system/decrypt': 'M10081',//民生解密 | ||
'/system/login': 'M10082',//民生登录 | ||
'/system/status': 'M10083',//民生支付状态查询 | ||
'/system/confirm/pay': 'M10084',//民生确认支付 | ||
'/get/activity/quota': 'A10010',//查询活动资格 | ||
'/get/all/activity': 'A10013',//获取所有活动 | ||
'/in/activity/duration': 'A10014',//是否活动期间 | ||
'/redirect/find/page': 'A10015'//是否跳转发现页 | ||
}; | ||
@@ -234,6 +238,3 @@ let BI_RM = '0123456789abcdefghijklmnopqrstuvwxyz'; | ||
} | ||
static encryption(url, obj, b){ | ||
// console.log('url:' + url); | ||
// console.log('obj:' + JSON.stringify(obj)); | ||
// console.log('b:' + b); | ||
static encryption(url, obj, bank){ | ||
let routerNumber = this.router(url); | ||
@@ -244,26 +245,8 @@ if (!routerNumber) { | ||
let params = obj; | ||
params.b = md5(b); | ||
params.b = md5(bank); | ||
params.method = routerNumber.method; | ||
// 删除空字段 | ||
params = this.deleteEmptyProperty(params); | ||
// ascii排序,升序 | ||
const ascii = this.sortAsc(params); | ||
// 拼接并加密 | ||
const signCode = md5(ascii + JBZ_KEY); | ||
// 存json中 | ||
params.signCode = signCode; | ||
//转换成字符串json | ||
params.signCode = md5(ascii + JBZ_KEY); | ||
let jsonString = JSON.stringify(params); | ||
// const encryption = encryptPublicLong(jsonString, GONG_YAO); | ||
// console.log('---------加密') | ||
// console.log(encryption) | ||
// console.log('*****************解密') | ||
// console.log(decryptPrivateLong(encryption, SI_YAO)) | ||
// 简单处理座位图 | ||
if (url === '/cinema/realtimeseats' || url === '/cinema/realtimeseatsinfo'){ | ||
return { | ||
cipher: jsonString, | ||
type: obj.type | ||
}; | ||
} | ||
return {cipher: jsonString}; | ||
@@ -270,0 +253,0 @@ } |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ { |
@@ -0,0 +0,0 @@ export * from './model' |
@@ -0,27 +1,55 @@ | ||
/** | ||
* 城市返回参数声明 | ||
*/ | ||
export declare interface CityModel { | ||
id: number, | ||
name: string; | ||
latin: string; | ||
/** | ||
* 城市id | ||
*/ | ||
id: number; | ||
/** | ||
* 城市名 | ||
*/ | ||
name: string; | ||
/** | ||
* 城市拼音 | ||
*/ | ||
latin: string; | ||
} | ||
export declare interface PageModel { | ||
index: number; | ||
size: number; | ||
} | ||
export declare interface SeatParasModel { | ||
cinemaId: string; | ||
showId: string; | ||
hallId: string; | ||
} | ||
/** | ||
* 画座位图处理返回参数声明 | ||
*/ | ||
export declare interface SmartSeatModel { | ||
row: number; | ||
col: number; | ||
status: number; | ||
loveIndex: number; | ||
rowNumber: number; | ||
colNumber: number; | ||
rowLocation: number; | ||
colLocation: number; | ||
/** | ||
* 座位显示的排数 | ||
*/ | ||
row: number; | ||
/** | ||
* 座位显示的列数 | ||
*/ | ||
col: number; | ||
/** | ||
* 位置状态 0:可选, 1:已售 | ||
*/ | ||
status: number; | ||
/** | ||
* 情侣座 0:正常, 1:左边, 2:右边 | ||
*/ | ||
loveIndex: number; | ||
/** | ||
* 座位排数编号 | ||
*/ | ||
rowNumber: number; | ||
/** | ||
* 座位列数编号 | ||
*/ | ||
colNumber: number; | ||
/** | ||
* 座位排数定位 | ||
**/ | ||
rowLocation: number; | ||
/** | ||
* 座位列数定位 | ||
*/ | ||
colLocation: number; | ||
} |
@@ -1,67 +0,376 @@ | ||
import {INetworkStandardPromiseType, JNetworkRoot} from 'icemilk'; | ||
import {PageModel} from "./model" | ||
import {CinemaFilterParas} from "./paras" | ||
import {INetworkStandardPromiseType, JNetwork, JToolDate, JToolObject as ObjectTool} from 'icemilk'; | ||
import {CinemaFilterParas, LocationParas, CoordinateParas, PageParas, SeatParas} from "./paras" | ||
export declare class JNetworkAccount extends JNetworkWorker{ | ||
accountLogin(mobile, password): Promise<any> | ||
accountLogout(sessionId): Promise<any> | ||
accountVerifyCode(mobile, type): Promise<any> | ||
accountRegister(mobile, verifyCode, password): Promise<any> | ||
accountUpdatepass(mobile, verfyCode, password): Promise<any> | ||
/** | ||
* @hidden | ||
*/ | ||
export declare class JNetworkAccount extends JNetworkWorker { | ||
/** | ||
* 用户登录 | ||
* @param key 用户加密信息 | ||
* @returns {*} 返回请求promise | ||
*/ | ||
systemLogin(key: string): Promise<any> | ||
} | ||
export declare class JNetworkCity extends JNetworkWorker{ | ||
/** | ||
* 推广Banner相关网络请求类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkBanner extends JNetworkWorker { | ||
/** | ||
* 推广Banner广告列表 | ||
* @param location banner的位置 | ||
* @param cityId 城市id | ||
* @returns {*} 返回Banner列表 | ||
*/ | ||
bannerList(location: string, cityId?: string | number): Promise<any> | ||
} | ||
/** | ||
* 影院相关网络请求类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkCinema extends JNetworkWorker { | ||
/** | ||
* 获取影院详情 | ||
* @param cinemaId 影院id | ||
* @description openId 用户唯一标识可选传入 | ||
* @returns {*} 返回影院详情 | ||
*/ | ||
cinemaDetail(cinemaId): Promise<any> | ||
/** | ||
* 获取影院列表 | ||
* @param filterParams 影院筛选条件 | ||
* @see LocationParas | ||
* @see CinemaFilterParas | ||
* @description LocationParas 所有属性必须不为空 CinemaFilterParas 所有属性都可为空 | ||
* @returns {*} 返回影院列表 | ||
*/ | ||
cinemasList(filterParams: LocationParas & CinemaFilterParas): Promise<any> | ||
/** | ||
* 获取影院拍片的电影列表 | ||
* @param cinemaId 影院id | ||
* @returns {*} 返回电影列表 | ||
*/ | ||
cinemaScreeningFilmList(cinemaId: string): Promise<any> | ||
/** | ||
* 获取影院拍片的日期列表 | ||
* @param cinemaId 影院id | ||
* @param filmId 影片id | ||
* @returns {*} 返回时间戳格式的日期列表 | ||
*/ | ||
cinemaScreeningDateList(cinemaId: string, filmId: string): Promise<any> | ||
/** | ||
* 获取影院排片的场次列表 | ||
* @param cinemaId 影院id | ||
* @param filmId 影片id | ||
* @param date 日期 | ||
* @returns {*} 返回场次列表 | ||
*/ | ||
cinemaScreeningItems(cinemaId: string, filmId: string, date: string): Promise<any> | ||
/** | ||
* 获取场次实时座位图 | ||
* @param type 票务商 | ||
* @param paras 影院排片参数 | ||
* @returns {*} 返回实时座位图 | ||
*/ | ||
cinemaSmartSeats(type: string, paras: SeatParas): Promise<any> | ||
/** | ||
* @hidden | ||
* 实时座位图结果 (异步处理) | ||
* @param requestId 请求Id,该值为申请实时座位图接口返回的requestId | ||
* @returns {*} 返回请求promise | ||
*/ | ||
realTimeSeatsInfo(requestId): Promise<any> | ||
} | ||
/** | ||
* 城市相关网络请求类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkCity extends JNetworkWorker { | ||
/** | ||
* 获取当前城市信息 | ||
* @param coordinate 经纬度信息 | ||
* @returns {*} 返回城市信息 | ||
*/ | ||
cityByCoordinate(coordinate: CoordinateParas): Promise<any> | ||
/** | ||
* @hidden | ||
* 获取定位结果 | ||
* @param requestId 请求定位接口返回的requestId | ||
* @returns {*} 返回请求promise | ||
*/ | ||
locationCityInfo(requestId): Promise<any> | ||
/** | ||
* 获取热门城市列表 | ||
* @returns {*} 返回城市列表 | ||
*/ | ||
cityHotList(): Promise<any> | ||
/** | ||
* 获取所有城市列表 | ||
* @returns {*} 返回城市列表 | ||
*/ | ||
cityList(): Promise<any> | ||
cityByCoordinate(coordinate): Promise<any> | ||
cityNeedCoordinate(): Promise<any> | ||
cityById(cityId): Promise<any> | ||
/** | ||
* 根据城市id获取城市信息 | ||
* @param cityId 城市id | ||
* @returns {*} 返回城市信息 | ||
*/ | ||
cityById(cityId: string): Promise<any> | ||
/** | ||
* 根据城市id获取地区列表 | ||
* @param cityId 城市id | ||
* @returns {*} 返回地区列表 | ||
*/ | ||
cityDistrictList(cityId): Promise<any> | ||
cityHotList(): Promise<any> | ||
/** | ||
* @ignore | ||
* 根据城市id获取地区列表 | ||
* @param cityId 城市id | ||
* @description 原始返回数据 | ||
* @returns {*} 返回地区列表 | ||
*/ | ||
districts(cityId): Promise<any> | ||
} | ||
export declare class JNetworkFilm extends JNetworkWorker{ | ||
filmHotfilms(page: PageModel): Promise<any> | ||
filmHotfilmsSimple(): Promise<any> | ||
filmWaitfilms(page): Promise<any> | ||
filmDetail(filmId, platform?): Promise<any> | ||
filmDateList(filmId): Promise<any> | ||
/** | ||
* 影片相关网络请求类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkFilm extends JNetworkWorker { | ||
/** | ||
* 获取前十热门影片列表 | ||
* @description Top10及总数 | ||
* @returns {*} 返回影片列表 | ||
*/ | ||
hotFilms(): Promise<any> | ||
/** | ||
* 获取热门影片列表 | ||
* @param page 分页信息(页码、条数) | ||
* @returns {*} 返回影片列表 | ||
*/ | ||
hotFilmsByPage(page: PageParas): Promise<any> | ||
/** | ||
* 获取前十待映影片列表 | ||
* @description Top10及总数 | ||
* @returns {*} 返回影片列表 | ||
*/ | ||
waitFilms(): Promise<any> | ||
/** | ||
* 获取待映影片列表 | ||
* @param page 分页信息(页码、条数) | ||
* @returns {*} 返回影片列表 | ||
*/ | ||
waitFilmsByPage(page: PageParas): Promise<any> | ||
/** | ||
* 获取影片信息 | ||
* @param filmId 影片id | ||
* @returns {*} 返回影片信息 | ||
*/ | ||
filmDetail(filmId: string): Promise<any> | ||
/** | ||
* 获取影片热门评论列表 | ||
* @param filmId 影片id | ||
* @returns {*} 返回影片评论列表 | ||
*/ | ||
filmHotComments(filmId: string): Promise<any> | ||
} | ||
export declare class JNetworkCinema extends JNetworkWorker{ | ||
cinemaDetail(cinemaId): Promise<any> | ||
cinemaList(location: any, cinemaFilter: CinemaFilterParas); | ||
cinemaList(cinemaFilter: CinemaFilterParas); | ||
cinemaList(location: any, cinemaFilter?: any): Promise<any> | ||
cinemaScreeningFilmList(cinemaId): Promise<any> | ||
cinemaScreeningDateList(cinemaId, filmId): Promise<any> | ||
cinemaScreeningItems(cinemaId, filmId, date): Promise<any> | ||
cinemaSeats(type, paras): Promise<any> | ||
cinemaSmartSeats(type, paras): Promise<any> | ||
cinemaFavoriteCinema(cinemaId, cinemaName): Promise<any> | ||
cinemaCancelFavoriteCinema(cinemaId): Promise<any> | ||
/** | ||
* 个人信息相关网络请求类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkMine extends JNetworkWorker { | ||
/** | ||
* 取消收藏的影院 | ||
* @param cinemaId 影院id | ||
* @description openId 用户唯一标识必须传入 | ||
* @returns {*} 返回是否取消成功 | ||
*/ | ||
cancelCollectCinema(cinemaId: string): Promise<any> | ||
/** | ||
* 收藏影院 | ||
* @param cinemaId 影院id | ||
* @param cinemaName 影院名称 | ||
* @param cinemaAddress 影院地址 | ||
* @description openId 用户唯一标识必须传入 | ||
* @returns {*} 返回是否收藏成功 | ||
*/ | ||
collectCinema(cinemaId: string, cinemaName: string, cinemaAddress: string): Promise<any> | ||
/** | ||
* 获取已经收藏的影院列表 | ||
* @param page 分页信息 | ||
* @description openId 用户唯一标识必须传入 | ||
* @returns {*} 返回影院列表 | ||
*/ | ||
collectedCinemaList(page: PageParas): Promise<any> | ||
/** | ||
* 获取订单列表 | ||
* @param page 分页 | ||
* @param type 订单类型(01:待支付/02:已支付/03:退款/不传:全部) | ||
* @description openId 用户唯一标识必须传入 | ||
* @returns {*} 返回订单列表 | ||
*/ | ||
orderList(page: PageParas & {type: string}): Promise<any> | ||
/** | ||
* 获取订单详情 | ||
* @param orderId 订单id | ||
* @description openId 用户唯一标识必须传入 | ||
* @returns {*} 返回订单详情 | ||
*/ | ||
orderDetail(orderId): Promise<any> | ||
/** | ||
* 取消订单 | ||
* @param orderId 订单id | ||
* @description openId 用户唯一标识必须传入 | ||
* @returns {*} 返回是否取消成功 | ||
*/ | ||
orderCancel(orderId): Promise<any> | ||
} | ||
export declare class JNetworkOther extends JNetworkWorker{ | ||
search(cityId, searchKey, nextPageFirstKey): Promise<any> | ||
hotSearchKeyword(): Promise<any> | ||
otherBanners(location, cityId): Promise<any> | ||
banners(position, cityId): Promise<any> | ||
static search(cityId, searchKey, nextPageFirstKey): Promise<any> | ||
/** | ||
* 其他相关网络请求类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkOther extends JNetworkWorker { | ||
/** | ||
* 加密 | ||
* @param key 待加密信息 | ||
* @returns {*} 返回加密后的信息 | ||
*/ | ||
systemEncrypt(key): Promise<string> | ||
/** | ||
* 解密 | ||
* @param key 待解密信息 | ||
* @returns {*} 返回解密后的信息 | ||
*/ | ||
systemDecrypt(key): Promise<string> | ||
} | ||
export declare class JNetworkMine extends JNetworkWorker{ | ||
mineOrder(): Promise<any> | ||
mineFavoriteCinema(): Promise<any> | ||
mineFavorite(): Promise<any> | ||
/** | ||
* 搜索相关网络信息类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkSearch extends JNetworkWorker { | ||
/** | ||
* 根据关键字搜索影片、影院列表 | ||
* @param key 搜索关键字 | ||
* @param page 分页信息 | ||
* @description location LocationParas 定位信息必传 | ||
* @returns {*} 返回搜索结果 | ||
*/ | ||
search(key, page: PageParas): Promise<any> | ||
/** | ||
* 获取热门搜索列表 | ||
* @returns {*} 返回热门搜索 | ||
*/ | ||
hotSearchList(): Promise<any> | ||
} | ||
export declare type LockSeatParams = { | ||
openId: true, | ||
mobile: true, | ||
showId: true, | ||
type: true, | ||
cinemaId: true, | ||
filmId: true, | ||
seatIds: true, | ||
count: true, | ||
cityId: true, | ||
seatInfos: false, | ||
hallId: false, | ||
areaInfo: false, | ||
applyKey: false, | ||
seatNames: false, | ||
} | ||
/** | ||
* 商务相关接口 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkTrade extends JNetworkWorker { | ||
/** | ||
* 锁座 | ||
* @param lockSeatParams 锁座需要的参数 | ||
* @returns {*} 返回锁座是否成功 | ||
*/ | ||
lockSeat(lockSeatParams: LockSeatParams): Promise<any> | ||
/** | ||
* @hidden | ||
* 锁座 | ||
* @returns {*} 返回请求promise | ||
*/ | ||
lockStatus(requestId): Promise<any> | ||
/** | ||
* 获取订单状态 | ||
* @param orderId 订单id | ||
* @returns {*} 返回订单状态 | ||
*/ | ||
orderStatus(orderId): Promise<any> | ||
/** | ||
* @hidden | ||
* 收银台返回的支付结果 | ||
* @param _CallBackUrl 订单id | ||
* @param orderId 订单id | ||
* @param token 加密参数 | ||
* @returns {*} 返回请求promise | ||
*/ | ||
confirmPay(_CallBackUrl, orderId, token): Promise<any> | ||
} | ||
/** | ||
* 暴露继承JNetworkWorker类的一个类,使其拥有配置接口的能力。 | ||
* @typeparam T 继承JNetworkWorker的类 | ||
* @param networkClass 需要暴露的类. | ||
* @param networkName 类名称. | ||
* @param config 类配置. | ||
*/ | ||
export declare function revealNetwork<T extends new(...args: any[]) => JNetworkWorker>(networkClass: T, | ||
networkName?: string, | ||
config?: object): T; | ||
export declare function configPicker(picker: any|object|(() => object)): void; | ||
/** | ||
* @hidden | ||
*/ | ||
export declare function configPicker(picker: any | object | (() => object)): void; | ||
/** | ||
* @hidden | ||
*/ | ||
export type PromiseData = Promise<any>; | ||
export type PromiseData = Promise<any>; | ||
export declare class JNetworkWorker extends JNetworkRoot { | ||
/** | ||
* 具备配置接口能力的网络请求基类 | ||
* @noInheritDoc | ||
*/ | ||
export declare class JNetworkWorker extends JNetwork { | ||
fetchRequest(...args): INetworkStandardPromiseType<any>; | ||
} | ||
@@ -0,21 +1,100 @@ | ||
/** | ||
* 筛选影院信息的参数声明 | ||
*/ | ||
export declare interface CinemaFilterParas { | ||
filmId: string; | ||
feature: string; | ||
region: string; | ||
sort: string; | ||
limit: string; | ||
/** | ||
* 排序 | ||
*/ | ||
orderType: string; | ||
/** | ||
* 区域 | ||
*/ | ||
regionName: string; | ||
/** | ||
* 影片id | ||
*/ | ||
filmId: string; | ||
/** | ||
* 特色 | ||
*/ | ||
feature: string; | ||
/** | ||
* 页码 | ||
*/ | ||
page: number; | ||
/** | ||
* 每页显示条数 | ||
*/ | ||
size: number; | ||
/** | ||
* 日期 | ||
*/ | ||
date: string; | ||
} | ||
/** | ||
* 分页参数声明 | ||
*/ | ||
export declare interface PageParas { | ||
/** | ||
* 页码 | ||
*/ | ||
page: number; | ||
/** | ||
* 每页条数 | ||
*/ | ||
size: number; | ||
} | ||
export declare interface CityParas { | ||
} | ||
/** | ||
* 经纬度参数声明 | ||
*/ | ||
export declare interface CoordinateParas { | ||
longitude: number | ||
latitude: number | ||
/** | ||
* 经度 | ||
*/ | ||
longitude: number | ||
/** | ||
* 纬度 | ||
*/ | ||
latitude: number | ||
} | ||
/** | ||
* 位置信息的参数声明 | ||
*/ | ||
export declare interface LocationParas { | ||
cityId: number | ||
longitude: number | ||
latitude: number | ||
/** | ||
* 城市id | ||
*/ | ||
cityId: number | ||
/** | ||
* 经度 | ||
*/ | ||
longitude: number | ||
/** | ||
* 纬度 | ||
*/ | ||
latitude: number | ||
} | ||
/** | ||
* 座位图参数声明 | ||
*/ | ||
export declare interface SeatParas { | ||
/** | ||
* 影院id | ||
*/ | ||
cinemaId: string; | ||
/** | ||
* 场次id | ||
*/ | ||
showId: string; | ||
/** | ||
* 区域id,淘宝独有 | ||
*/ | ||
sectionId: string; | ||
} |
@@ -0,0 +0,0 @@ export declare class JManagerSeat { |
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
762625
18787
18
64
4
7
+ Addedicemilk@1.0.10-beta0(transitive)
- Removedicemilk@1.0.9-beta11(transitive)
Updatedaxios@^0.18.1
Updatedicemilk@1.0.10-beta0