Commit ca89e37c authored by qinhaitao's avatar qinhaitao

fix: 🐛 线上地址

parent 51e6ce0d
/** @format */
interface Iconfig {
VIP_CALLBACK_URL: string;
generateVipCallBackUrl(activityId?: string): string;
}
export declare const getConfig: (context: Context) => Iconfig;
export {};
/** @format */
declare const _default: {
VIP_CALLBACK_URL: string;
generateVipCallBackUrl(activityId: string): string;
};
export default _default;
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
var appId = '消费端ID';
var constants_1 = require("../constants");
exports.default = {
VIP_CALLBACK_URL: "https://m.duanqu.com/?_ariver_appid=" + appId
generateVipCallBackUrl: function (activityId) {
return "https://m.duanqu.com/?_ariver_appid=" + constants_1.appId + "&query=activityId%3D" + activityId;
}
};
//# sourceMappingURL=online.js.map
\ No newline at end of file
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,IAAM,KAAK,GAAG,OAAO,CAAA;AAErB,kBAAe;IACb,gBAAgB,EAAE,yCAAuC,KAAO;CACjE,CAAA"}
\ No newline at end of file
{"version":3,"file":"online.js","sourceRoot":"","sources":["../../src/config/online.ts"],"names":[],"mappings":";AAAA,cAAc;;AAEd,0CAAoC;AAEpC,kBAAe;IACb,sBAAsB,EAAtB,UAAuB,UAAkB;QACvC,OAAO,yCAAuC,iBAAK,4BAAuB,UAAY,CAAA;IACxF,CAAC;CACF,CAAA"}
\ No newline at end of file
declare const _default: {
VIP_CALLBACK_URL: string;
generateVipCallBackUrl(): string;
};
/** @format */
export default _default;
......@@ -2,6 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
/** @format */
exports.default = {
VIP_CALLBACK_URL: 'testUrl'
generateVipCallBackUrl: function () {
return "\u5BA2\u6237\u7AEF\u751F\u6210\u7684\u9884\u89C8\u5730\u5740";
}
};
//# sourceMappingURL=test.js.map
\ No newline at end of file
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,kBAAe;IACb,gBAAgB,EAAE,SAAS;CAC5B,CAAA"}
\ No newline at end of file
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/config/test.ts"],"names":[],"mappings":";;AAAA,cAAc;AACd,kBAAe;IACb,sBAAsB;QACpB,OAAO,8DAAY,CAAA;IACrB,CAAC;CACF,CAAA"}
\ No newline at end of file
......@@ -176,6 +176,7 @@ export declare const DRAW_STATUS: {
EXPIRED: number;
RETRY: number;
};
export declare const appId = "${\u9700\u8981\u8865\u5145}";
export declare const C_APP_NAME: string;
export declare const TAOBAO_SUCCESS_ORDER_STATUS: string[];
export declare const enum ACTIVITY_STATUS {
......
"use strict";
/** @format */
Object.defineProperty(exports, "__esModule", { value: true });
exports.SWICH_TOCK = exports.PRIZE_DATA_TYPE = exports.PRIZE_TYPE = exports.TASK_STATUS = exports.TASK_RATE_TYPE = exports.TAOBAO_SUCCESS_ORDER_STATUS = exports.C_APP_NAME = exports.DRAW_STATUS = exports.TBERROR = exports.CODE_TYPES = exports.BusinessError = void 0;
exports.SWICH_TOCK = exports.PRIZE_DATA_TYPE = exports.PRIZE_TYPE = exports.TASK_STATUS = exports.TASK_RATE_TYPE = exports.TAOBAO_SUCCESS_ORDER_STATUS = exports.C_APP_NAME = exports.appId = exports.DRAW_STATUS = exports.TBERROR = exports.CODE_TYPES = exports.BusinessError = void 0;
var sdk_1 = require("./sdk");
exports.BusinessError = {
// 更新重试失败(用于并发更新)
......@@ -116,8 +116,9 @@ exports.DRAW_STATUS = {
// 重新领取
RETRY: 6
};
exports.appId = '${需要补充}';
// C端的APP NAME
exports.C_APP_NAME = 'promotioncenter-${需要补充}';
exports.C_APP_NAME = "promotioncenter-" + exports.appId;
// 订单状态
exports.TAOBAO_SUCCESS_ORDER_STATUS = [
'WAIT_SELLER_SEND_GOODS',
......
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAA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IACzB,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,CAAC;IACf,IAAI,EAAE,CAAC,CAAC,MAAM;CACf,CAAA;AAED,OAAO;AACM,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAA;AAED,OAAO;AACM,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC,CAAC,KAAK;CACrB,CAAA;AAED,WAAW;AACX,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,mDAAY,CAAA;AACd,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
\ No newline at end of file
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,cAAc;;;AAEd,6BAA0C;AAE7B,QAAA,aAAa,GAAG;IAC3B,iBAAiB;IACjB,kBAAkB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,0BAAM;KACnB;IACD,QAAQ;IACR,iBAAiB,EAAE;QACjB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,sBAAsB,EAAE;QACtB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,mBAAmB,EAAE;QACnB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,aAAa,EAAE;QACb,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,gCAAO;KACpB;IACD,QAAQ;IACR,YAAY,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,OAAO;KACpB;IACD,UAAU;IACV,oBAAoB,EAAE;QACpB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,wDAAW;KACxB;IACD,UAAU;IACV,yBAAyB,EA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;AAED,SAAS;AACI,QAAA,WAAW,GAAG;IACzB,MAAM;IACN,SAAS,EAAE,CAAC;IACZ,MAAM;IACN,UAAU,EAAE,CAAC;IACb,OAAO;IACP,OAAO,EAAE,CAAC;IACV,OAAO;IACP,IAAI,EAAE,CAAC;IACP,MAAM;IACN,OAAO,EAAE,CAAC;IACV,OAAO;IACP,KAAK,EAAE,CAAC;CACT,CAAA;AAEY,QAAA,KAAK,GAAG,SAAS,CAAA;AAE9B,cAAc;AACD,QAAA,UAAU,GAAW,qBAAmB,aAAO,CAAA;AAE5D,OAAO;AACM,QAAA,2BAA2B,GAAa;IACnD,wBAAwB;IACxB,uBAAuB;IACvB,0BAA0B;IAC1B,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;CACtB,CAAA;AAcD,UAAU;AACG,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC;CACX,CAAA;AAED,MAAM;AACO,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,CAAC;IACV,YAAY,EAAE,CAAC;IACf,IAAI,EAAE,CAAC,CAAC,MAAM;CACf,CAAA;AAED,OAAO;AACM,QAAA,UAAU,GAAG;IACxB,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACV,CAAA;AAED,OAAO;AACM,QAAA,eAAe,GAAG;IAC7B,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,CAAC,CAAC,KAAK;CACrB,CAAA;AAED,WAAW;AACX,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,mDAAY,CAAA;AACd,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
\ No newline at end of file
......@@ -95,15 +95,15 @@ var User = /** @class */ (function () {
var session = _a.session, activityUserNick = _a.activityUserNick;
var userService = _b[0];
return __awaiter(this, void 0, void 0, function () {
var callbackUrl, VIP_CALLBACK_URL, result;
return __generator(this, function (_c) {
switch (_c.label) {
var _c, callbackUrl, activityId, generateVipCallBackUrl, result;
return __generator(this, function (_d) {
switch (_d.label) {
case 0:
callbackUrl = context.data.callbackUrl;
VIP_CALLBACK_URL = config_1.getConfig(context).VIP_CALLBACK_URL;
return [4 /*yield*/, userService.getShopVip(session, activityUserNick, callbackUrl || VIP_CALLBACK_URL)];
_c = context.data, callbackUrl = _c.callbackUrl, activityId = _c.activityId;
generateVipCallBackUrl = config_1.getConfig(context).generateVipCallBackUrl;
return [4 /*yield*/, userService.getShopVip(session, activityUserNick, callbackUrl || generateVipCallBackUrl(activityId))];
case 1:
result = _c.sent();
result = _d.sent();
return [2 /*return*/, sdk_1.resultsModel.success(result)];
}
});
......
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AACvD,oCAAqC;AAiBrC;IAAA;IA6CA,CAAC;IA5CC;;OAEG;IAIG,oBAAK,GAAX,UACE,OAAsB,EACtB,EAAqD,EACrD,EAA0D;YADxD,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,YAAY,kBAAA;YAChC,WAAW,QAAA,EAAE,aAAa,QAAA;;;;;;wBAEnB,MAAM,GAAK,OAAO,OAAZ,CAAY;wBAElB,QAAQ,GAAK,OAAO,CAAC,IAAI,SAAjB,CAAiB;6BAE7B,CAAC,QAAQ,EAAT,wBAAS;wBACX,qBAAM,WAAW,CAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,EAAA;;wBAArD,SAAqD,CAAA;;4BAErD,qBAAM,WAAW,CAAC,cAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,YAAY,CAAC,EAAA;;wBAAjE,SAAiE,CAAA;;;oBAGnE,UAAU;oBACV,qBAAM,aAAa,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,EAAA;;wBADtD,UAAU;wBACV,SAAsD,CAAA;wBAEtD,sBAAO,kBAAY,CAAC,OAAO,CAAC;gCAC1B,MAAM,QAAA;6BACP,CAAC,EAAA;;;;KACH;IACD;;OAEG;IAGG,yBAAU,GAAhB,UACE,OAAoB,EACpB,EAA+C,EAC/C,EAA4B;YAD1B,OAAO,aAAA,EAAE,gBAAgB,sBAAA;YAC1B,WAAW,QAAA;;;;;;wBAEJ,WAAW,GAAK,OAAO,CAAC,IAAI,YAAjB,CAAiB;wBAC5B,gBAAgB,GAAK,kBAAS,CAAC,OAAO,CAAC,iBAAvB,CAAuB;wBAChC,qBAAM,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,gBAAgB,EAAE,WAAW,IAAI,gBAAgB,CAAC,EAAA;;wBAAjG,MAAM,GAAG,SAAwF;wBAEvG,sBAAO,kBAAY,CAAC,OAAO,CAAC,MAAM,CAAC,EAAA;;;;KACpC;IArCD;QAHC,uBAAW,CAAC,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAWvB;IACH,WAAC;CAAA,AA7CD,IA6CC;kBA7CoB,IAAI"}
\ No newline at end of file
{"version":3,"file":"user.controller.js","sourceRoot":"","sources":["../../src/controller/user.controller.ts"],"names":[],"mappings":";AAAA,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEd,0CAAuE;AAEvE,8BAAqC;AACrC,sCAAuD;AACvD,oCAAqC;AAiBrC;IAAA;IAiDA,CAAC;IAhDC;;OAEG;IAIG,oBAAK,GAAX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AE,UAAU,CAAC,CAAC;QAC7D,6BAAiB;QACjB,oBAAQ,CAAC,CAAC,qBAAW,EAAE,uBAAa,CAAC,CAAC;;;;qCAsBtC;IAMD;QAFC,uBAAW,CAAC,CAAC,YAAY,CAAC,CAAC;QAC3B,oBAAQ,CAAC,CAAC,qBAAW,CAAC,CAAC;;;;0CAevB;IACH,WAAC;CAAA,AAjDD,IAiDC;kBAjDoB,IAAI"}
\ No newline at end of file
......@@ -53,6 +53,7 @@ var sdk_1 = require("../sdk");
var constants_1 = require("../constants");
var service_1 = require("../service");
var utils_1 = require("../utils");
var config_1 = require("../config");
// 检验参数是否存在
exports.paramsCheck = function (params) {
return function (target, name, descriptor) {
......@@ -113,16 +114,18 @@ exports.vipCheck = function (_a) {
args[_i] = arguments[_i];
}
return __awaiter(this, void 0, void 0, function () {
var context, _a, otherArgs, userService, session, vipInfo;
var context, _a, otherArgs, activityId, generateVipCallBackUrl, userService, session, vipInfo;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
context = args[0], _a = args[1], otherArgs = _a === void 0 ? {} : _a;
activityId = context.data.activityId;
generateVipCallBackUrl = config_1.getConfig(context).generateVipCallBackUrl;
userService = new service_1.UserService(context);
return [4 /*yield*/, utils_1.getSellerSession(context)];
case 1:
session = (_b.sent()).session;
return [4 /*yield*/, userService.getShopVip(session, callbackUrl)];
return [4 /*yield*/, userService.getShopVip(session, callbackUrl || generateVipCallBackUrl(activityId))];
case 2:
vipInfo = _b.sent();
if (!vipInfo.isVip && intercept)
......
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/decorator/check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,cAAc;AACd,8BAAqC;AACrC,0CAAyC;AACzC,sCAAqD;AACrD,kCAA2C;AAE3C,WAAW;AACE,QAAA,WAAW,GAAG,UAAC,MAAgB;IAC1C,OAAO,UAAU,MAAc,EAAE,IAAY,EAAE,UAA8B;QAC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AC,KAAK,CAAC,sBAAU,CAAC,YAAY,EAAE,4BAAQ,CAAC,EAAA;wBACvE,WAAW,GAAG,IAAI,qBAAW,CAAC,OAAO,CAAC,CAAA;wBAGvB,qBAAM,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC;4BAC9D,QAAQ;0BADsD;;wBAAxD,YAAY,GAAG,SAAyC;wBAC9D,QAAQ;wBACR,IAAI,CAAC,YAAY,EAAE;4BACjB,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,iBAAiB,CAAC,EAAA;yBACxD;wBACO,SAAS,GAAc,YAAY,UAA1B,EAAE,OAAO,GAAK,YAAY,QAAjB,CAAiB;wBACrC,WAAW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;wBAC9B,IAAI,WAAW,GAAG,SAAS,EAAE;4BAC3B,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,sBAAsB,EAAE,gCAAO,CAAC,EAAA;yBACtE;wBACD,IAAI,WAAW,GAAG,OAAO,EAAE;4BACzB,sBAAO,kBAAY,CAAC,KAAK,CAAC,sBAAU,CAAC,mBAAmB,EAAE,gCAAO,CAAC,EAAA;yBACnE;wBACD,sBAAO,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,OAAO,wBAAO,SAAS,KAAE,YAAY,cAAA,IAAG,CAAC,EAAA;;;;KACvE,CAAA;AACH,CAAC,CAAA"}
\ No newline at end of file
......@@ -4,7 +4,7 @@ import online from './online'
import test from './test'
interface Iconfig {
VIP_CALLBACK_URL: string
generateVipCallBackUrl(activityId?: string): string
}
const configs = {
......
/** @format */
const appId = '消费端ID'
import { appId } from '../constants'
export default {
VIP_CALLBACK_URL: `https://m.duanqu.com/?_ariver_appid=${appId}`
generateVipCallBackUrl(activityId: string) {
return `https://m.duanqu.com/?_ariver_appid=${appId}&query=activityId%3D${activityId}`
}
}
/** @format */
export default {
VIP_CALLBACK_URL: 'testUrl'
generateVipCallBackUrl() {
return `客户端生成的预览地址`
}
}
......@@ -119,8 +119,10 @@ export const DRAW_STATUS = {
RETRY: 6
}
export const appId = '${需要补充}'
// C端的APP NAME
export const C_APP_NAME: string = 'promotioncenter-${需要补充}'
export const C_APP_NAME: string = `promotioncenter-${appId}`
// 订单状态
export const TAOBAO_SUCCESS_ORDER_STATUS: string[] = [
......
......@@ -60,9 +60,13 @@ export default class User {
{ session, activityUserNick }: IControllerInfos,
[userService]: [UserService]
) {
const { callbackUrl } = context.data
const { VIP_CALLBACK_URL } = getConfig(context)
const result = await userService.getShopVip(session, activityUserNick, callbackUrl || VIP_CALLBACK_URL)
const { callbackUrl, activityId } = context.data
const { generateVipCallBackUrl } = getConfig(context)
const result = await userService.getShopVip(
session,
activityUserNick,
callbackUrl || generateVipCallBackUrl(activityId)
)
return resultsModel.success(result)
}
......
......@@ -3,7 +3,7 @@ import { resultsModel } from '../sdk'
import { CODE_TYPES } from '../constants'
import { UserService, BaseService } from '../service'
import { getSellerSession } from '../utils'
import { getConfig } from '../config'
// 检验参数是否存在
export const paramsCheck = (params: string[]) => {
return function (target: Object, name: string, descriptor: PropertyDescriptor) {
......@@ -46,9 +46,12 @@ export const vipCheck = ({ intercept = true, callbackUrl = '' }) => {
descriptor.value = async function (...args: any[]) {
const [context, otherArgs = {}] = args
const { activityId } = context.data
const { generateVipCallBackUrl } = getConfig(context)
const userService = new UserService(context)
const { session } = await getSellerSession(context)
const vipInfo = await userService.getShopVip(session, callbackUrl)
const vipInfo = await userService.getShopVip(session, callbackUrl || generateVipCallBackUrl(activityId))
if (!vipInfo.isVip && intercept) return resultsModel.error(CODE_TYPES.ERROR_NO_VIP, '非店铺会员', vipInfo)
return method.apply(target, [context, { ...otherArgs, vipInfo, session }])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment