Bläddra i källkod

【会员系统】DMG 订单相关API 数据类型调整

zenghong 1 vecka sedan
förälder
incheckning
dee2a88f9b

+ 2 - 2
PDF Office/PDF Master/MemberCenter/Model/KMMemberCenterManager.swift

@@ -1244,7 +1244,7 @@ class KMMemberCenterManager: NSObject {
      @param num                      批量购买数量
      @param complete 回调
      */
-    func createOrder(productId: String, paymentMethod: Int, price: NSNumber, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
+    func createOrder(productId: String, paymentMethod: Int, price: String, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
         let token: String = KMMemberInfo.shared.access_token
         if token == "" {
             complete(false, nil)
@@ -1303,7 +1303,7 @@ class KMMemberCenterManager: NSObject {
      @param num                      批量购买数量
      @param complete 回调
      */
-    func createSubscriber(productId: String, paymentMethod: Int, price: NSNumber, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
+    func createSubscriber(productId: String, paymentMethod: Int, price: String, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
         let token: String = KMMemberInfo.shared.access_token
         if token == "" {
             complete(false, nil)

+ 4 - 4
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -133,12 +133,12 @@ class KMProductModel: ObservableObject {
 //            }
             
             //创建买断订单
-//            creatOrder(productId: "SP2024102300004", paymentMethod: 0, price: NSNumber(value: 119.99), discountFlag: 0, couponCode: "", num: 1) { [weak self] success, result in
+//            creatOrder(productId: "SP2024102300004", paymentMethod: 0, price: "119.99", discountFlag: 0, couponCode: "", num: 1) { [weak self] success, result in
 //
 //            }
             
             //创建订阅订单(创建买断订单后会报错已经是购买用户,不能重复购买)
-//            createSubscriber(productId: "SP2024103100003", paymentMethod: 0, price: NSNumber(value: 99.99), discountFlag: 0, couponCode: "", num: 1) { [weak self] success, result in
+//            createSubscriber(productId: "SP2024102300003", paymentMethod: 0, price: "99.99", discountFlag: 0, couponCode: "", num: 1) { [weak self] success, result in
 //
 //            }
             
@@ -247,7 +247,7 @@ class KMProductModel: ObservableObject {
      @param num                      批量购买数量
      @param complete 回调
      */
-    func creatOrder(productId: String, paymentMethod: Int, price: NSNumber, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
+    func creatOrder(productId: String, paymentMethod: Int, price: String, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
         checkConnectionAvailable()
         KMMemberCenterManager.manager.createOrder(productId: productId, paymentMethod: paymentMethod, price: price, discountFlag: discountFlag, couponCode: couponCode, num: num) { [weak self] success, result in
             if success {
@@ -273,7 +273,7 @@ class KMProductModel: ObservableObject {
      @param num                      批量购买数量
      @param complete 回调
      */
-    func createSubscriber(productId: String, paymentMethod: Int, price: NSNumber, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
+    func createSubscriber(productId: String, paymentMethod: Int, price: String, discountFlag: Int, couponCode: String, num: Int, _ complete: @escaping KMMemberProductComplete) {
         checkConnectionAvailable()
         KMMemberCenterManager.manager.createSubscriber(productId: productId, paymentMethod: paymentMethod, price: price, discountFlag: discountFlag, couponCode: couponCode, num: num) { [weak self] success, result in
             if success {