Bladeren bron

Merge branch 'develop' of http://git.quyaqu.com/youngliu/CAISHEN into develop

xiaoxi 6 jaren geleden
bovenliggende
commit
20630ccc30

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

@@ -153,7 +153,12 @@ class KXSFSubmitOrderViewController: KXBaseViewController ,UITableViewDataSource
153 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 162
             self.navigationController?.popViewController(animated: true)
158 163
             DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(1*NSEC_PER_SEC))/Double(NSEC_PER_SEC)) {
159 164
                 MBProgressHUD.showTip("提交订单成功!")

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

@@ -189,7 +189,8 @@ extension KXSellFlowersMainViewController{
189 189
                 reusableView = (collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: collectionSupplementTopHeaderID, for: indexPath))
190 190
                 let bannerView : CollectionViewBannerView = reusableView as! CollectionViewBannerView
191 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 194
                 return bannerView
194 195
             }
195 196
             else{
@@ -234,7 +235,6 @@ class CollectionViewBannerView: UICollectionReusableView ,TYCyclePagerViewDelega
234 235
     override init(frame: CGRect) {
235 236
         super.init(frame: frame)
236 237
         self.addSubview(cyclePageView)
237
-        cyclePageView.reloadData()
238 238
     }
239 239
     
240 240
     lazy var cyclePageView:TYCyclePagerView = {