dsh-tokenbank 0.1.31 → 0.1.32

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.
Files changed (2) hide show
  1. package/lib/client.js +24 -11
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -561,17 +561,30 @@ 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
- h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
565
- h('span', { style: { fontWeight: 700 } }, 'TokenBank'),
566
- h('span', { style: { display: 'flex', alignItems: 'center', gap: 4 } },
567
- '$1 = ¥6.50',
568
- h('span', { style: { background: '#ff4f1f', color: '#fff', borderRadius: 4, padding: '1px 5px', fontSize: 11, fontWeight: 700 } }, '最优惠'))),
569
- h('div', { style: { display: 'flex', justifyContent: 'space-between' } },
570
- h('span', null, 'OpenAI/Anthropic'),
571
- h('span', null, '$1 = ¥7.25 ~ 7.45')),
572
- h('div', { style: { display: 'flex', justifyContent: 'space-between' } },
573
- h('span', null, '国内中转站均价'),
574
- h('span', null, '$1 = ¥7.80 ~ 8.50'))),
564
+ (function () {
565
+ // 三家统一按当前所选档位的 CNY 面额折算可买 TOKEN(各家单价不同):
566
+ // TokenBank 用真实 credit(含赠送),OpenAI/Anthropic 与中转站按其 $ 单价换算
567
+ var cny = picked[0] / 100
568
+ var tbTokens = (function () {
569
+ var n = pickedCredit(picked[0])
570
+ return typeof n === 'number' ? n / 1e6 : cny / 6.5 * 1e6
571
+ })()
572
+ var vendorTokens = cny / 7.25 * 1e6 // OpenAI/Anthropic 按 $1=¥7.25(低档价)
573
+ var relayTokens = cny / 7.8 * 1e6 // 中转站按 $1=¥7.80(低档价)
574
+ return [
575
+ h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' } },
576
+ h('span', { style: { fontWeight: 700 } }, 'TokenBank'),
577
+ h('span', { style: { display: 'flex', alignItems: 'center', gap: 4 } },
578
+ humanTokens(tbTokens) + ' TOKEN',
579
+ h('span', { style: { background: '#ff4f1f', color: '#fff', borderRadius: 4, padding: '1px 5px', fontSize: 11, fontWeight: 700 } }, '最优惠'))),
580
+ h('div', { style: { display: 'flex', justifyContent: 'space-between' } },
581
+ h('span', null, 'OpenAI/Anthropic'),
582
+ h('span', null, humanTokens(vendorTokens) + ' TOKEN')),
583
+ h('div', { style: { display: 'flex', justifyContent: 'space-between' } },
584
+ h('span', null, '国内中转站均价'),
585
+ h('span', null, humanTokens(relayTokens) + ' TOKEN')),
586
+ ]
587
+ })()),
575
588
  ),
576
589
  h('button', {
577
590
  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.31",
3
+ "version": "0.1.32",
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",