@lynn123411/dsh-a6api 1.5.4 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +8 -4
- package/lib/client.js.map +2 -2
- package/lib/index.js +6 -3
- package/lib/index.js.map +2 -2
- package/lib/types/types.d.ts +3 -1
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -649,6 +649,10 @@ var MerchantCard = ({ model }) => {
|
|
|
649
649
|
const hasMerchant = Boolean(merchant?.channel_id);
|
|
650
650
|
const isPinnedHere = model.pinStatus === "pin_here";
|
|
651
651
|
const isPinnedElsewhere = model.pinStatus === "pin_elsewhere";
|
|
652
|
+
const hasPin = isPinnedHere || isPinnedElsewhere;
|
|
653
|
+
const isPinMismatch = hasPin && model.pinTokenMatched === false;
|
|
654
|
+
const isPinUnknown = hasPin && model.pinTokenMatched === void 0;
|
|
655
|
+
const pinTokenNote = isPinMismatch ? "\uFF1B\u8BE5\u56FA\u5B9A\u5C5E\u4E8E\u5176\u4ED6\u4EE4\u724C\uFF0C\u4EC5\u4F9B\u53C2\u8003" : isPinUnknown ? "\uFF1B\u672A\u80FD\u786E\u8BA4\u662F\u5426\u5C5E\u4E8E\u5F53\u524D\u4EE4\u724C\uFF0C\u4EC5\u4F9B\u53C2\u8003" : "";
|
|
652
656
|
const isChannelDisabled = Boolean(merchant?.user_channel_disabled);
|
|
653
657
|
const flashActionError = (msg) => {
|
|
654
658
|
if (errorTimerRef.current) clearTimeout(errorTimerRef.current);
|
|
@@ -779,7 +783,7 @@ var MerchantCard = ({ model }) => {
|
|
|
779
783
|
"span",
|
|
780
784
|
{
|
|
781
785
|
className: "dsh-a6-pin-badge here",
|
|
782
|
-
"data-tooltip": `\u8BE5\u6A21\u578B\u5DF2\u56FA\u5B9A\u5230\u5F53\u524D\u5546\u5BB6${model.pinnedFallback === false ? "\uFF08\u4E25\u683C\u56FA\u5B9A\uFF09" : "\uFF0C\u5F02\u5E38\u65F6\u81EA\u52A8\u5207\u6362\u667A\u80FD\u4F18\u9009"}${
|
|
786
|
+
"data-tooltip": `\u8BE5\u6A21\u578B\u5DF2\u56FA\u5B9A\u5230\u5F53\u524D\u5546\u5BB6${model.pinnedFallback === false ? "\uFF08\u4E25\u683C\u56FA\u5B9A\uFF09" : "\uFF0C\u5F02\u5E38\u65F6\u81EA\u52A8\u5207\u6362\u667A\u80FD\u4F18\u9009"}${pinTokenNote}`,
|
|
783
787
|
"data-tooltip-pos": "down",
|
|
784
788
|
children: "\u5DF2\u56FA\u5B9A"
|
|
785
789
|
}
|
|
@@ -788,9 +792,9 @@ var MerchantCard = ({ model }) => {
|
|
|
788
792
|
"span",
|
|
789
793
|
{
|
|
790
794
|
className: "dsh-a6-pin-badge elsewhere",
|
|
791
|
-
"data-tooltip": `\u8BE5\u6A21\u578B\u5DF2\u56FA\u5B9A\u5230${model.pinnedChannelId ? `\u5546\u6237 #${model.pinnedChannelId}` : "\u5176\u4ED6\u5546\u5BB6"}${model.pinnedSupplierName ? `\uFF08${model.pinnedSupplierName}\uFF09` : ""}${
|
|
795
|
+
"data-tooltip": `\u8BE5\u6A21\u578B\u5DF2\u56FA\u5B9A\u5230${model.pinnedChannelId ? `\u5546\u6237 #${model.pinnedChannelId}` : "\u5176\u4ED6\u5546\u5BB6"}${model.pinnedSupplierName ? `\uFF08${model.pinnedSupplierName}\uFF09` : ""}${!hasMerchant ? "\uFF1B\u5F53\u524D\u6682\u65E0\u5546\u5BB6\u6570\u636E" : ""}${pinTokenNote}`,
|
|
792
796
|
"data-tooltip-pos": "down",
|
|
793
|
-
children: "\u5DF2\u56FA\u5B9A\u5230\u5176\u4ED6\u5546\u5BB6"
|
|
797
|
+
children: !hasMerchant && model.pinnedChannelId ? `\u5DF2\u56FA\u5B9A\u5230\u5546\u6237 #${model.pinnedChannelId}` : "\u5DF2\u56FA\u5B9A\u5230\u5176\u4ED6\u5546\u5BB6"
|
|
794
798
|
}
|
|
795
799
|
),
|
|
796
800
|
isChannelDisabled && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dsh-a6-pin-badge disabled", "data-tooltip": "\u5F53\u524D\u5546\u5BB6\u5DF2\u5BF9\u8BE5\u6A21\u578B\u7981\u7528\uFF0C\u8DEF\u7531\u4E0D\u4F1A\u547D\u4E2D\u6B64\u6E20\u9053", "data-tooltip-pos": "down", children: "\u5DF2\u7981\u7528" })
|
|
@@ -898,7 +902,7 @@ var MerchantCard = ({ model }) => {
|
|
|
898
902
|
className: "dsh-a6-btn dsh-a6-btn-danger dsh-a6-btn-sm",
|
|
899
903
|
onClick: handleUnpin,
|
|
900
904
|
disabled: isBusy || !canWebAction || model.pinTokenMatched === false || isProbing || isQueued,
|
|
901
|
-
"data-tooltip": isProbing || isQueued ? "\u63A2\u6D4B\u5B8C\u6210\u540E\u518D\u53D6\u6D88\u56FA\u5B9A" : model.pinTokenMatched === false ? "\u8BE5\u56FA\u5B9A\u5C5E\u4E8E\u5176\u4ED6\u4EE4\u724C\uFF0C\u65E0\u6CD5\u5728\u6B64\u53D6\u6D88\uFF1B\u5982\u9700\u53D6\u6D88\u8BF7\u5230\u5B98\u7F51\u6216\u5148\u4E3A\u5F53\u524D\u4EE4\u724C\u56FA\u5B9A\u6B64\u5546\u5BB6" : canWebAction ? "\
|
|
905
|
+
"data-tooltip": isProbing || isQueued ? "\u63A2\u6D4B\u5B8C\u6210\u540E\u518D\u53D6\u6D88\u56FA\u5B9A" : model.pinTokenMatched === false ? "\u8BE5\u56FA\u5B9A\u5C5E\u4E8E\u5176\u4ED6\u4EE4\u724C\uFF0C\u65E0\u6CD5\u5728\u6B64\u53D6\u6D88\uFF1B\u5982\u9700\u53D6\u6D88\u8BF7\u5230\u5B98\u7F51\u6216\u5148\u4E3A\u5F53\u524D\u4EE4\u724C\u56FA\u5B9A\u6B64\u5546\u5BB6" : !canWebAction ? "\u9700\u5148\u5728\u300C\u57FA\u7840\u914D\u7F6E\u300D\u914D\u7F6E\u7CFB\u7EDF\u8BBF\u95EE\u4EE4\u724C/\u4F1A\u8BDD" : model.pinTokenMatched === void 0 ? "\u672A\u80FD\u786E\u8BA4\u8BE5\u56FA\u5B9A\u662F\u5426\u5C5E\u4E8E\u5F53\u524D\u4EE4\u724C\uFF0C\u70B9\u51FB\u540E\u5C06\u91CD\u65B0\u89E3\u6790\u5E76\u5C1D\u8BD5\u53D6\u6D88\uFF1B\u82E5\u5931\u8D25\u53EF\u5148\u63A2\u6D4B\u4E00\u6B21\u540E\u91CD\u8BD5\uFF0C\u6216\u5230\u5B98\u7F51\u624B\u52A8\u53D6\u6D88" : "\u53D6\u6D88\u56FA\u5B9A\u540E\u6062\u590D\u667A\u80FD\u4F18\u9009\u8DEF\u7531\uFF0C\u53EF\u91CD\u65B0\u63A2\u6D4B\u540E\u518D\u51B3\u5B9A\u662F\u5426\u56FA\u5B9A",
|
|
902
906
|
children: isBusy ? "\u5904\u7406\u4E2D..." : "\u53D6\u6D88\u56FA\u5B9A"
|
|
903
907
|
}
|
|
904
908
|
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|