Commit b4c5b919 authored by mqf_0707's avatar mqf_0707

修复getStorage首次返回状态

parents b8663266 09ae4bcf
...@@ -140,8 +140,10 @@ var checkShopFavoredStatus = function (sellerId) { return __awaiter(void 0, void ...@@ -140,8 +140,10 @@ var checkShopFavoredStatus = function (sellerId) { return __awaiter(void 0, void
return [4 /*yield*/, helpers_1.promisifyApiToTb('checkShopFavoredStatus', { id: +sellerId })]; return [4 /*yield*/, helpers_1.promisifyApiToTb('checkShopFavoredStatus', { id: +sellerId })];
case 1: case 1:
result = _a.sent(); result = _a.sent();
if (result === null || result === void 0 ? void 0 : result.isFavor) if ((result === null || result === void 0 ? void 0 : result.isFavor) !== undefined)
return [2 /*return*/, result.isFavor]; return [2 /*return*/, result.isFavor];
if (result === 'checkShopFavoredStatus 仅支持真机调用,请在手机淘宝中运行')
return [2 /*return*/, true];
return [2 /*return*/, result]; return [2 /*return*/, result];
} }
}); });
......
{"version":3,"file":"tb.js","sourceRoot":"","sources":["../../src/core/tb.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sCAKmB;AACnB;;;;;GAKG;AACI,IAAM,WAAW,GAAG,UAAC,OAAe,EAAE,QAAiB,EAAE,SAAqB;IACjF,4BAAkB,CAAC,WAAW,EAAC;QAC3B,OAAO,EAAE,OAAO,IAAI,WAAW;QAC/B,QAAQ,EAAE,QAAQ,IAAI,IAAI;QAC1B,OAAO,EAAE,SAAS;KACrB,CAAC,CAAA;AACN,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB;AACF;;;GAGG;AACI,IAAM,WAAW,GAAG,UAAC,OAAe;IACvC,4BAAkB,CAAC,OAAO,EAAC;QACvB,OAAO,SAAA;KACV,CAAC,CAAA;AACN,CAAC,CAAC;AAJW,QAAA,WAAW,eAItB;AACF;;;;;GAKG;AACI,IAAM,aAAa,GAAG,UAAO,KAAY,EAAE,OAAe,EAAE,SAAqB;IAApD,sBAAA,EAAA,YAAY;;;YAC5C,4BA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AG,SAA4C;gBACzD,sBAAO,MAAM,EAAA;;;KAChB,CAAA;AAHY,QAAA,YAAY,gBAGxB;AACD;;GAEG;AACI,IAAM,YAAY,GAAG;;;;oBACX,qBAAM,0BAAgB,CAAC,SAAS,EAAC,EAAE,CAAC,EAAA;;gBAA7C,MAAM,GAAG,SAAoC;gBACjD,sBAAO,MAAM,EAAA;;;KAChB,CAAA;AAHY,QAAA,YAAY,gBAGxB;AACD;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAAO,MAAc,EAAE,KAAc,EAAE,QAAiB;;;;oBACzE,qBAAM,0BAAgB,CAAC,oBAAoB,EAAC;oBACrD,IAAI,EAAE;wBACF,MAAM,QAAA;wBACN,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC;wBAClB,QAAQ,EAAE,QAAQ,IAAI,CAAC;wBACvB,aAAa,EAAE,EAAE;qBACpB;iBACJ,CAAC,EAAA;;gBAPE,MAAM,GAAG,SAOX;gBACF,sBAAO,MAAM,EAAA;;;KAChB,CAAA;AAVY,QAAA,kBAAkB,sBAU9B"}
\ No newline at end of file \ No newline at end of file
...@@ -220,10 +220,15 @@ exports.uploadImage = uploadImage; ...@@ -220,10 +220,15 @@ exports.uploadImage = uploadImage;
*/ */
var getAuthUserInfo = function () { var getAuthUserInfo = function () {
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
// @ts-ignore my.getAuthUserInfo({
success: function (userInfo) {
resolve(userInfo);
},
fail: function (err) {
my.authorize({ my.authorize({
scopes: 'scope.userInfo', scopes: 'scope.userInfo',
success: function () { success: function () {
console.log('执行 my.authorize');
// @ts-ignore // @ts-ignore
my.getAuthUserInfo({ my.getAuthUserInfo({
success: function (userInfo) { success: function (userInfo) {
...@@ -238,6 +243,9 @@ var getAuthUserInfo = function () { ...@@ -238,6 +243,9 @@ var getAuthUserInfo = function () {
reject(err); reject(err);
} }
}); });
}
});
// @ts-ignore
}); });
}; };
exports.getAuthUserInfo = getAuthUserInfo; exports.getAuthUser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C,oBAAoB,CAAC;YAC1B,OAAO,EAAC,MAAM;YACd,SAAS,EAAC;gBACT,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC;gBACtB,WAAW,EAAC,cAAc;gBAC1B,cAAc,EAAC,WAAW;aAC1B;YACD,OAAO,EAAE,UAAC,GAAG;gBACZ,OAAO,CAAC,IAAI,CAAC,CAAA;YACd,CAAC;YACD,IAAI,EAAE,UAAC,GAAG;gBACT,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAClB,CAAC;SACD,CAAC,CAAC;IACJ,CAAC,CAAC,CAAA;AACH,CAAC,CAAA;AAlBY,QAAA,oBAAoB,wBAkBhC"}
\ No newline at end of file \ No newline at end of file
/**
* 通用toast
* @param {string} content toast内容
* @param {number} duration 显示时长
* @param {function} successCb 成功回调
*/
export declare const commonToast: (content: any, duration: number, successCb: any) => string;
/**
* 简易alert
* @param {string} content toast内容
*/
export declare const simpleAlert: (content: any) => void;
/**
* 获取授权用户信息
* @returns {object} 用户登录信息
*/
export declare const getAuthUserInfo: () => Promise<{
nickName: string;
avatar: string;
mixNick: string;
}>;
/**
* 获取系统信息
* @returns {object} 小程序系统信息
*/
export declare const getSystemInfo: () => Promise<{
version: string;
}>;
/**
* 执行关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
export declare const favorShop: (sellerId: any) => Promise<boolean>;
/**
* 判断是否关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
export declare const checkShopFavoredStatus: (sellerId: any) => Promise<boolean>;
/**
* 跳转到外部链接
* @param {string} url 跳转链接
*/
export declare const navigateToOutside: (url: any) => boolean;
/**
* 跳转到内部链接(新开窗口)
* @param {string} url 跳转链接
*/
export declare const navigateTo: (url: any) => boolean;
/**
* 跳转到内部链接(不新开窗口)
* @param {string} url 跳转链接
*/
export declare const redirectTo: (url: any) => boolean;
/**
* 获取服务器时间
* @returns {number} 服务器时间戳
*/
export declare const getServerTime: () => Promise<number>;
/**
* 收藏商品
* @param {number} 商品id
* @returns {object} 收藏结果
*/
export declare const collectGoods: (id: any) => Promise<boolean>;
/**
* 查询商品收藏状态
* @param {number} 商品id
* @returns {boolean} 商品收场状态
*/
export declare const checkGoodsCollectedStatus: (id: any) => Promise<boolean>;
/**
* 跳转到淘宝商品页
* @param {string} itemId 商品ID
*/
export declare const openDetail: (itemId: any) => Promise<boolean>;
/**
* 获取淘宝用户收货地址
*/
export declare const getUserAddress: (opts?: {}) => Promise<{
name: number;
phone: number;
address: number;
}>;
/**
* 分享到群聊卡片
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
export declare const chattingSendCard: (requestInfo: any) => Promise<boolean>;
/**
* 分享到群聊卡片
* @param {*} cloud 小程序云
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
export declare const textRiskIdentification: (text: any) => Promise<boolean>;
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.textRiskIdentification = exports.chattingSendCard = exports.getUserAddress = exports.openDetail = exports.checkGoodsCollectedStatus = exports.collectGoods = exports.getServerTime = exports.redirectTo = exports.navigateTo = exports.navigateToOutside = exports.checkShopFavoredStatus = exports.favorShop = exports.getSystemInfo = exports.getAuthUserInfo = exports.simpleAlert = exports.commonToast = void 0;
/**
* 通用toast
* @param {string} content toast内容
* @param {number} duration 显示时长
* @param {function} successCb 成功回调
*/
var commonToast = function (content, duration, successCb) {
if (duration === void 0) { duration = 3000; }
return '暂不支持toast';
};
exports.commonToast = commonToast;
/**
* 简易alert
* @param {string} content toast内容
*/
var simpleAlert = function (content) {
alert(content);
};
exports.simpleAlert = simpleAlert;
/**
* 获取授权用户信息
* @returns {object} 用户登录信息
*/
var getAuthUserInfo = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, {
nickName: 'nickName',
avatar: '123',
mixNick: '1234'
}];
});
}); };
exports.getAuthUserInfo = getAuthUserInfo;
/**
* 获取系统信息
* @returns {object} 小程序系统信息
*/
var getSystemInfo = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, {
version: '9.5.0'
}];
});
}); };
exports.getSystemInfo = getSystemInfo;
/**
* 执行关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
var favorShop = function (sellerId) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
if (!sellerId) {
console.error('favorShop: 请传入卖家Id');
return [2 /*return*/, false];
}
return [2 /*return*/, true];
});
}); };
exports.favorShop = favorShop;
/**
* 判断是否关注店铺
* @param {number} sellerId 店铺归属的卖家Id
* @returns {boolean} 关注状态
*/
var checkShopFavoredStatus = function (sellerId) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
if (!sellerId) {
console.error('checkShopFavoredStatus: 请传入卖家Id');
return [2 /*return*/, false];
}
return [2 /*return*/, true];
});
}); };
exports.checkShopFavoredStatus = checkShopFavoredStatus;
/**
* 跳转到外部链接
* @param {string} url 跳转链接
*/
var navigateToOutside = function (url) {
if (!url) {
console.error('navigateToOutside: 请传入url');
return false;
}
window.location = url;
};
exports.navigateToOutside = navigateToOutside;
/**
* 跳转到内部链接(新开窗口)
* @param {string} url 跳转链接
*/
var navigateTo = function (url) {
if (!url) {
console.error('navigateTo: 请传入url');
return false;
}
window.location = url;
};
exports.navigateTo = navigateTo;
/**
* 跳转到内部链接(不新开窗口)
* @param {string} url 跳转链接
*/
var redirectTo = function (url) {
if (!url) {
console.error('redirectTo: 请传入url');
return false;
}
// @ts-ignore
window.replace(url);
};
exports.redirectTo = redirectTo;
/**
* 获取服务器时间
* @returns {number} 服务器时间戳
*/
var getServerTime = function () { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, +new Date()];
});
}); };
exports.getServerTime = getServerTime;
/**
* 收藏商品
* @param {number} 商品id
* @returns {object} 收藏结果
*/
var collectGoods = function (id) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
if (!id) {
console.error('collectGoods: 请传入商品id');
return [2 /*return*/, false];
}
return [2 /*return*/, true];
});
}); };
exports.collectGoods = collectGoods;
/**
* 查询商品收藏状态
* @param {number} 商品id
* @returns {boolean} 商品收场状态
*/
var checkGoodsCollectedStatus = function (id) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
if (!id) {
console.error('checkGoodsCollectedStatus: 请传入商品id');
return [2 /*return*/, false];
}
return [2 /*return*/, true];
});
}); };
exports.checkGoodsCollectedStatus = checkGoodsCollectedStatus;
/**
* 跳转到淘宝商品页
* @param {string} itemId 商品ID
*/
var openDetail = function (itemId) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
if (!itemId) {
console.error('openDetail: 请传入商品id');
return [2 /*return*/, false];
}
// @ts-ignore
window.location = 'https://item.taobao.com/item.htm?id=' + itemId;
return [2 /*return*/];
});
}); };
exports.openDetail = openDetail;
/**
* 获取淘宝用户收货地址
*/
var getUserAddress = function (opts) {
if (opts === void 0) { opts = {}; }
return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, {
name: 1,
phone: 1,
address: 123
}];
});
});
};
exports.getUserAddress = getUserAddress;
/**
* 分享到群聊卡片
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
var chattingSendCard = function (requestInfo) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
alert('无法模拟');
return [2 /*return*/, false];
});
}); };
exports.chattingSendCard = chattingSendCard;
/**
* 分享到群聊卡片
* @param {*} cloud 小程序云
* @param {object} requestInfo 分享到群聊卡片所需请求参数
*/
var textRiskIdentification = function (text) { return __awaiter(void 0, void 0, void 0, function () {
return __generator(this, function (_a) {
return [2 /*return*/, true];
});
}); };
exports.textRiskIdentification = textRiskIdentification;
//# sourceMappingURL=tbMock.js.map
\ No newline at end of file
{"version":3,"file":"tbMock.js","sourceRoot":"","sources":["../../src/core/tbMock.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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YACT,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;YACrC,sBAAO,KAAK,EAAC;SAChB;QACD,aAAa;QACb,MAAM,CAAC,QAAQ,GAAG,sCAAsC,GAAG,MAAM,CAAC;;;KACrE,CAAC;AAPW,QAAA,UAAU,cAOrB;AACF;;GAEG;AACI,IAAM,cAAc,GAAG,UAAO,IAAS;IAAT,qBAAA,EAAA,SAAS;;;YAC1C,sBAAO;oBACH,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,OAAO,EAAE,GAAG;iBACf,EAAA;;;CACJ,CAAC;AANW,QAAA,cAAc,kBAMzB;AACF;;;GAGG;AACI,IAAM,gBAAgB,GAAG,UAAO,WAAW;;QAC9C,KAAK,CAAC,MAAM,CAAC,CAAC;QACd,sBAAO,KAAK,EAAC;;KAChB,CAAC;AAHW,QAAA,gBAAgB,oBAG3B;AACF;;;;GAIG;AACI,IAAM,sBAAsB,GAAG,UAAO,IAAI;;QAC7C,sBAAO,IAAI,EAAC;;KACf,CAAA;AAFY,QAAA,sBAAsB,0BAElC"}
\ No newline at end of file
{ {
"name": "tbcc-sdk-ts", "name": "tbcc-sdk-ts",
"version": "1.0.3", "version": "1.0.4",
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
......
...@@ -75,7 +75,8 @@ export const checkShopFavoredStatus = async (sellerId: number) => { ...@@ -75,7 +75,8 @@ export const checkShopFavoredStatus = async (sellerId: number) => {
return false; return false;
} }
let result: { isFavor?: boolean } = await promisifyApiToTb('checkShopFavoredStatus',{ id: +sellerId }) let result: { isFavor?: boolean } = await promisifyApiToTb('checkShopFavoredStatus',{ id: +sellerId })
if(result?.isFavor) return result.isFavor if(result?.isFavor !== undefined) return result.isFavor
if(result === 'checkShopFavoredStatus 仅支持真机调用,请在手机淘宝中运行')return true
return result return result
}; };
/** /**
......
...@@ -149,10 +149,15 @@ export const uploadImage = async (opts = {}) => { ...@@ -149,10 +149,15 @@ export const uploadImage = async (opts = {}) => {
*/ */
export const getAuthUserInfo = () => { export const getAuthUserInfo = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
// @ts-ignore my.getAuthUserInfo({
success: userInfo => {
resolve(userInfo);
},
fail: err => {
my.authorize({ my.authorize({
scopes: 'scope.userInfo', scopes: 'scope.userInfo',
success: () => { success: () => {
console.log('执行 my.authorize')
// @ts-ignore // @ts-ignore
my.getAuthUserInfo({ my.getAuthUserInfo({
success: userInfo => { success: userInfo => {
...@@ -167,6 +172,10 @@ export const getAuthUserInfo = () => { ...@@ -167,6 +172,10 @@ export const getAuthUserInfo = () => {
reject(err); reject(err);
} }
}); });
}
});
// @ts-ignore
}); });
}; };
/** /**
......
...@@ -76,3 +76,5 @@ interface ISkuInfo { ...@@ -76,3 +76,5 @@ interface ISkuInfo {
skuId: string skuId: string
quantity: string quantity: string
} }
declare var my: any
\ No newline at end of file
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