jikaipeng il y a 6 ans
Parent
commit
04b17d3c03

+ 6 - 1
CAISHEN/SellFlowers/Main/controllers/KXSFSubmitOrderViewController.swift

153
             mutabArr.add(dict)
153
             mutabArr.add(dict)
154
         }
154
         }
155
         
155
         
156
-        KXHTTP.post(urlString, params: ["product_data":mutabArr,"address_id":self.addressId], success: { (json) in
156
+        let data : NSData! = try? JSONSerialization.data(withJSONObject: mutabArr, options: []) as NSData
157
+        let JSONString = NSString(data:data as Data,encoding: String.Encoding.utf8.rawValue)
158
+        
159
+        let params = ["product_data":JSONString as Any,"address_id":self.addressId] as [String : Any]
160
+        
161
+        KXHTTP.post(urlString, params: params, success: { (json) in
157
             self.navigationController?.popViewController(animated: true)
162
             self.navigationController?.popViewController(animated: true)
158
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(1*NSEC_PER_SEC))/Double(NSEC_PER_SEC)) {
163
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(1*NSEC_PER_SEC))/Double(NSEC_PER_SEC)) {
159
                 MBProgressHUD.showTip("提交订单成功!")
164
                 MBProgressHUD.showTip("提交订单成功!")

+ 2 - 2
CAISHEN/SellFlowers/Main/controllers/KXSellFlowersMainViewController.swift

189
                 reusableView = (collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: collectionSupplementTopHeaderID, for: indexPath))
189
                 reusableView = (collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: collectionSupplementTopHeaderID, for: indexPath))
190
                 let bannerView : CollectionViewBannerView = reusableView as! CollectionViewBannerView
190
                 let bannerView : CollectionViewBannerView = reusableView as! CollectionViewBannerView
191
                 bannerView.bannerDelegate = self
191
                 bannerView.bannerDelegate = self
192
-                bannerView.imageArray = ["SF_Main_banner1","SF_Main_banner2","SF_Main_banner1"]
192
+                bannerView.imageArray = ["SF_Main_banner1","SF_Main_banner2"]
193
+                bannerView.cyclePageView.reloadData()
193
                 return bannerView
194
                 return bannerView
194
             }
195
             }
195
             else{
196
             else{
234
     override init(frame: CGRect) {
235
     override init(frame: CGRect) {
235
         super.init(frame: frame)
236
         super.init(frame: frame)
236
         self.addSubview(cyclePageView)
237
         self.addSubview(cyclePageView)
237
-        cyclePageView.reloadData()
238
     }
238
     }
239
     
239
     
240
     lazy var cyclePageView:TYCyclePagerView = {
240
     lazy var cyclePageView:TYCyclePagerView = {