dsh-tokenbank 0.1.31 → 0.1.33
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 +27 -11
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -561,17 +561,33 @@ window.__ModuleLoader__.load({
|
|
|
561
561
|
},
|
|
562
562
|
h('div', { style: { fontWeight: 700, fontSize: 13, marginBottom: 6 } }, '价格对比'),
|
|
563
563
|
h('div', { style: { display: 'flex', flexDirection: 'column', gap: 4, fontSize: 12 } },
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
564
|
+
(function () {
|
|
565
|
+
// 三家统一按当前所选档位的 CNY 面额折算可买 TOKEN(各家单价不同):
|
|
566
|
+
// TokenBank 用真实 credit(含赠送),OpenAI/Anthropic 与中转站按其 $ 单价换算
|
|
567
|
+
var cny = picked[0] / 100
|
|
568
|
+
var tbTokens = (function () {
|
|
569
|
+
var list = packs && packs[0] || []
|
|
570
|
+
for (var i = 0; i < list.length; i++) {
|
|
571
|
+
if (list[i].fen === picked[0] && typeof list[i].tokens === 'number') return list[i].tokens
|
|
572
|
+
}
|
|
573
|
+
return cny / 6.5 * 1e6 * 0.04 // 兜底:¥6.5/$ 与约 25000 TOKEN/$
|
|
574
|
+
})()
|
|
575
|
+
var vendorTokens = cny / 7.25 * 1e6 // OpenAI/Anthropic 按 $1=¥7.25(低档价)
|
|
576
|
+
var relayTokens = cny / 7.8 * 1e6 // 中转站按 $1=¥7.80(低档价)
|
|
577
|
+
return [
|
|
578
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
|
|
579
|
+
h('span', { style: { fontWeight: 700 } }, 'TokenBank'),
|
|
580
|
+
h('span', { style: { display: 'flex', alignItems: 'center', gap: 4 } },
|
|
581
|
+
humanTokens(tbTokens) + ' TOKEN',
|
|
582
|
+
h('span', { style: { background: '#ff4f1f', color: '#fff', borderRadius: 4, padding: '1px 5px', fontSize: 11, fontWeight: 700 } }, '最优惠'))),
|
|
583
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between' } },
|
|
584
|
+
h('span', null, 'OpenAI/Anthropic'),
|
|
585
|
+
h('span', null, humanTokens(vendorTokens) + ' TOKEN')),
|
|
586
|
+
h('div', { style: { display: 'flex', justifyContent: 'space-between' } },
|
|
587
|
+
h('span', null, '国内中转站均价'),
|
|
588
|
+
h('span', null, humanTokens(relayTokens) + ' TOKEN')),
|
|
589
|
+
]
|
|
590
|
+
})()),
|
|
575
591
|
),
|
|
576
592
|
h('button', {
|
|
577
593
|
type: 'button', style: Object.assign({}, primaryButtonStyle, { justifyContent: 'center' }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-tokenbank",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "DSH 免费模型:一键注册 TokenBank 领免费 APIKey 送 $5 体验金,免费 GLM 模型直接进模型列表;自带余额查询、API Key 密钥托管(临时额度转永久)、每日签到、充值入口(支付宝),获取免费模型无需自建中转。致敬 dsh-our-free-model。官网 https://bank.skillpie.cn",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|