Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ethan
/
appframe
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit cf893e75
authored
2026-07-17 15:42:27 +0800
by
ethanlamzs
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
md
1 parent
422b3273
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
125 deletions
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
ios/Runner/Testing.storekit
lib/data/repositories/message/xe_create_order_handler.dart
lib/services/subscription_service_ios.dart
pubspec.yaml
ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
View file @
cf893e7
...
...
@@ -52,7 +52,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration =
"
Debug
"
buildConfiguration =
"
Profile
"
selectedDebuggerIdentifier =
"Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier =
"Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile =
"$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
...
...
ios/Runner/Testing.storekit
deleted
100644 → 0
View file @
422b327
{
"appPolicies" : {
"eula" : "",
"policies" : [
{
"locale" : "en_US",
"policyText" : "",
"policyURL" : ""
}
]
},
"identifier" : "6C86460D",
"nonRenewingSubscriptions" : [
{
"displayPrice" : "49.90",
"familyShareable" : false,
"internalID" : "6785393224",
"localizations" : [
{
"description" : "智学会员1个月有效期",
"displayName" : "智学VIP月卡",
"locale" : "zh_Hans"
}
],
"productID" : "cn.banxe.appframe.membership.1m",
"referenceName" : "1个月时长会员",
"type" : "NonRenewingSubscription"
},
{
"displayPrice" : "129",
"familyShareable" : false,
"internalID" : "6788337604",
"localizations" : [
{
"description" : "智学会员服务1个季度的有效期",
"displayName" : "智学VIP季卡",
"locale" : "zh_Hans"
}
],
"productID" : "cn.banxe.appframe.membership.3m",
"referenceName" : "1季度会员",
"type" : "NonRenewingSubscription"
},
{
"displayPrice" : "299",
"familyShareable" : false,
"internalID" : "6788342136",
"localizations" : [
{
"description" : "智学VIP会员服务1年有效期",
"displayName" : "智学VIP年卡",
"locale" : "zh_Hans"
}
],
"productID" : "cn.banxe.appframe.membership.12m",
"referenceName" : "一年会员",
"type" : "NonRenewingSubscription"
},
{
"displayPrice" : "209",
"familyShareable" : false,
"internalID" : "6788341520",
"localizations" : [
{
"description" : "智学VIP会员服务半年有效期",
"displayName" : "智学VIP半年卡",
"locale" : "zh_Hans"
}
],
"productID" : "cn.banxe.appframe.membership.6m",
"referenceName" : "半年会员",
"type" : "NonRenewingSubscription"
},
{
"displayPrice" : "1",
"familyShareable" : false,
"internalID" : "6789528182",
"localizations" : [
{
"description" : "智学会员服务1天有效",
"displayName" : "会员1天",
"locale" : "zh_Hans"
}
],
"productID" : "cn.banxe.appframe.membership.0m",
"referenceName" : "测试会员",
"type" : "NonRenewingSubscription"
}
],
"products" : [
],
"settings" : {
"_applicationInternalID" : "6757346215",
"_askToBuyEnabled" : false,
"_billingGracePeriodEnabled" : false,
"_billingIssuesEnabled" : false,
"_developerTeamID" : "42794B2KBU",
"_disableDialogs" : false,
"_failTransactionsEnabled" : false,
"_lastSynchronizedDate" : 805370487.02650404,
"_locale" : "zh_Hans",
"_renewalBillingIssuesEnabled" : false,
"_storefront" : "CHN",
"_storeKitErrors" : [
],
"_timeRate" : 0
},
"subscriptionGroups" : [
],
"version" : {
"major" : 4,
"minor" : 0
}
}
lib/data/repositories/message/xe_create_order_handler.dart
View file @
cf893e7
...
...
@@ -235,14 +235,26 @@ class XeCreateOrderHandler extends MessageHandler {
// 为了调试,先模拟
var
product
;
var
packageName
=
""
;
if
(
totalFee
.
toString
()==
"4990"
){
packageName
=
"月卡"
;
}
else
if
(
totalFee
.
toString
()==
"12900"
){
packageName
=
"季卡"
;
}
else
if
(
totalFee
.
toString
()==
"20900"
){
packageName
=
"半年卡"
;
}
else
if
(
totalFee
.
toString
()==
"29900"
){
packageName
=
"年卡"
;
}
for
(
var
p
in
_subService
.
products
)
{
// 因为带了一个¥符号
//debugPrint('checking ==> 产品ID: ${p.id}, 标题: ${p.title}, 价格: ${p.price}');
if
(
p
.
price
.
toString
().
indexOf
(
totalFee
.
toString
().
substring
(
0
,
2
))==
1
){
if
(
p
.
title
.
toString
().
indexOf
(
packageName
)>
0
){
product
=
p
;
//
debugPrint('match =====> 产品ID: ${p.id}, 标题: ${p.title}, 价格: ${p.price}');
debugPrint
(
'match =====> 产品ID:
${p.id}
, 标题:
${p.title}
, 价格:
${p.price}
'
);
break
;
}
//
}
if
(
product
==
null
){
throw
Exception
(
'订单生成失败'
);
...
...
lib/services/subscription_service_ios.dart
View file @
cf893e7
...
...
@@ -79,10 +79,10 @@ class SubscriptionService {
}
_products
=
response
.
productDetails
;
//
debugPrint('获取到 ${_products.length} 个产品');
//
for (var p in _products) {
//
debugPrint('x1=====> 产品ID: ${p.id}, 标题: ${p.title}, 价格: ${p.price}');
//
}
debugPrint
(
'获取到
${_products.length}
个产品'
);
for
(
var
p
in
_products
)
{
debugPrint
(
'x1=====> 产品ID:
${p.id}
, 标题:
${p.title}
, 价格:
${p.price}
'
);
}
}
...
...
pubspec.yaml
View file @
cf893e7
name
:
appframe
description
:
"
app
frame
project."
publish_to
:
'
none'
version
:
1.1.
0
version
:
1.1.
2
environment
:
sdk
:
"
>=3.5.0
<4.0.0"
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment