|
|
@@ -28,21 +28,23 @@ function recombinationSubscribeGoods(): SubscribeInfoType[] {
|
|
|
*/
|
|
|
function actionSubcribe() {
|
|
|
const arr = recombinationSubscribeGoods();
|
|
|
- const req = buildSubscribePeq(arr);
|
|
|
- APP.sendQuoteServer(req, funCode.MainClassNumber_Quota_SubscriptRsp, {
|
|
|
- onSuccess: (res: any) => {
|
|
|
- parseSubscribeRsp(res)
|
|
|
- .then((value) => {
|
|
|
- if (value) {
|
|
|
- console.log('订阅成功!', value);
|
|
|
- }
|
|
|
- })
|
|
|
- .catch((err) => {
|
|
|
- console.log('订阅失败:', err);
|
|
|
- });
|
|
|
- },
|
|
|
- onFail: (err) => console.log('订阅失败:', err),
|
|
|
- } as Callback);
|
|
|
+ if (arr.length) {
|
|
|
+ const req = buildSubscribePeq(arr);
|
|
|
+ APP.sendQuoteServer(req, funCode.MainClassNumber_Quota_SubscriptRsp, {
|
|
|
+ onSuccess: (res: any) => {
|
|
|
+ parseSubscribeRsp(res)
|
|
|
+ .then((value) => {
|
|
|
+ if (value) {
|
|
|
+ console.log('订阅成功!', value);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ console.log('订阅失败:', err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onFail: (err) => console.log('订阅失败:', err),
|
|
|
+ } as Callback);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|