Commit 9fdd4c98 authored by 刘俊宏's avatar 刘俊宏

对接商品详情

parent cc69d710
......@@ -267,6 +267,10 @@
[self.delegatedata getHTMLByVc:html];
[self.navigationController popViewControllerAnimated:YES];
}
// LMNWebViewController *vc = [[LMNWebViewController alloc] init];
// vc.html = [NSString stringWithFormat:@"<html>%@</html>",html];
// [self.navigationController pushViewController:vc animated:YES];
}];
}
- (NSString *)getStingByData:(NSString *)htmlString {
......
......@@ -7,7 +7,6 @@
//
import UIKit
import WebKit
@objc protocol AddGuiGeCellDelegate {
@objc optional func AddGuiGeCellClick(cell:AddGuiGeCell)
......@@ -20,7 +19,8 @@ class AddGuiGeCell: UITableViewCell {
}
@IBOutlet weak var webView: WKWebView!
@IBOutlet weak var webView: UIWebView!
@IBOutlet weak var imgBtn: UIButton!
override func awakeFromNib() {
super.awakeFromNib()
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16097" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
......@@ -27,29 +27,28 @@
<action selector="btnClick:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="f2z-zc-fd6"/>
</connections>
</button>
<wkWebView hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CAr-OI-1ll">
<webView hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="VPT-Oe-WSi">
<rect key="frame" x="0.0" y="0.0" width="375" height="123.5"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<wkWebViewConfiguration key="configuration">
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/>
</wkWebViewConfiguration>
</wkWebView>
<connections>
<outlet property="delegate" destination="-1" id="L8I-bk-r9l"/>
</connections>
</webView>
</subviews>
<constraints>
<constraint firstItem="FpT-RN-ad7" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="CTD-cA-1jp"/>
<constraint firstItem="CAr-OI-1ll" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="ONc-Hx-udy"/>
<constraint firstAttribute="trailing" secondItem="CAr-OI-1ll" secondAttribute="trailing" id="TDz-Oa-TvQ"/>
<constraint firstItem="CAr-OI-1ll" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="YRm-tl-0No"/>
<constraint firstAttribute="bottom" secondItem="CAr-OI-1ll" secondAttribute="bottom" id="jKB-ok-a3G"/>
<constraint firstItem="VPT-Oe-WSi" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Req-lk-rDq"/>
<constraint firstAttribute="trailing" secondItem="VPT-Oe-WSi" secondAttribute="trailing" id="Xg4-F3-bgr"/>
<constraint firstAttribute="bottom" secondItem="VPT-Oe-WSi" secondAttribute="bottom" id="kSn-lp-ILF"/>
<constraint firstAttribute="bottom" secondItem="FpT-RN-ad7" secondAttribute="bottom" constant="50" id="log-wz-xog"/>
<constraint firstItem="VPT-Oe-WSi" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="z8u-Ne-QN3"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="btmH" destination="log-wz-xog" id="axu-Jf-zWN"/>
<outlet property="imgBtn" destination="FpT-RN-ad7" id="DdI-mW-7wW"/>
<outlet property="webView" destination="CAr-OI-1ll" id="L9y-OD-5rY"/>
<outlet property="webView" destination="VPT-Oe-WSi" id="zDL-Pq-yMr"/>
</connections>
<point key="canvasLocation" x="131.15942028985509" y="121.875"/>
</tableViewCell>
......
......@@ -16,9 +16,9 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
let zfWayArr = ["未支付","现金","转账(私)","转账(公)","转账(微信)","转账(支付宝)"]
let thArr = ["自提","派送"]
let ckArr = ["暂不出库","直接出库"]
var holderArr = ["未付款","未支付","自提","","暂不出库","0","0"]
var holderArr = ["未支付","未付款","自提","","暂不出库","0","0"]
let p2Arr = ["定金支付方式","定金支付状态"]
var holder2Arr = ["未付款","未支付"]
var holder2Arr = ["未支付","未付款"]
var p3Arr = ["支付方式","支付状态","提货方式","选择地址","出货状态","运费","其他费用"]
//客户model
var cusModel:CusListAllDataModel?//客户资料
......@@ -449,14 +449,14 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
holder2Arr.insert(zfTypeArr[selectNum], at: 1)
holder2Arr.remove(at: 2)
break
case 100:
case 100://状态
orderType = selectNum
cellDataArr.removeAll()
zhiFuWay = 0
zhiFuStatus = 0
holderArr.insert("未付款", at: 0)
holderArr.insert("未支付", at: 0)
holderArr.remove(at: 1)
holderArr.insert("未支付", at: 1)
holderArr.insert("未付款", at: 1)
holderArr.remove(at: 2)
listView.reloadData()
break
......
......@@ -12,7 +12,7 @@ import Photos
import IQKeyboardManagerSwift
import Dollar
class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,GoodsClassViewControllerDelegate,PinPaiListViewControllerDelegate,AddImgCellDelegate,AddGuiGeCellDelegate,CreatNewSpecsViewControllerDelegate,ShangPinGguiGeCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,TitleAndSwitchCellDelegate,TitleAndTFCellDelegate,YuShouWeiKuanFaHuoCellDelegate,UITextFieldDelegate,ShowTimeSelectViewDelegate {
class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GLAlertSelectViewDelegate,GoodsClassViewControllerDelegate,PinPaiListViewControllerDelegate,AddImgCellDelegate,AddGuiGeCellDelegate,CreatNewSpecsViewControllerDelegate,ShangPinGguiGeCellDelegate,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,TitleAndSwitchCellDelegate,TitleAndTFCellDelegate,YuShouWeiKuanFaHuoCellDelegate,UITextFieldDelegate,ShowTimeSelectViewDelegate, LMNoteViewControllerDelegate {
@IBOutlet weak var btmBtnViewH: NSLayoutConstraint!
......@@ -496,6 +496,9 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
self.yunShuType = (model.data?.goods_res!.transportation)! - 1
self.tishixxArr1.insert(self.yunShuTypeArr[self.yunShuType!], at: 4)
self.tishixxArr1.remove(at: 5)
//商品详情
self.goodsDesc = model.data?.goods_res?.goods_desc as! String
self.listTbv.reloadData()
}) { (error) in
......@@ -692,8 +695,8 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
cell.imgBtn.tag = indexPath.row
if goodsDesc.count > 0 {
cell.webView.isHidden = false
let request = URLRequest.init(url: URL(string: "https://m.baidu.com/")!)
cell.webView.load(request)
let goodsDescHmtl = "<html>" + goodsDesc + "</html>"
cell.webView.loadHTMLString(goodsDescHmtl, baseURL: nil)
}
cell.imgBtn.setImage(UIImage(named: "tjxq"), for: .normal)
cell.btmH.constant = 25
......@@ -709,15 +712,16 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
@objc func editHtml(){
print("编辑软文")
let vc = LMNoteViewController()
vc.htmlStr = goodsDesc;
vc.delegatedata = self
self.navigationController?.pushViewController(vc, animated: true)
}
func AddGuiGeCellClick(cell: AddGuiGeCell) {
print("底部广告软文跳转")
goodsDesc = "1"
listTbv.reloadData()
// let vc = LMNoteViewController()
// self.navigationController?.pushViewController(vc, animated: true)
let vc = LMNoteViewController()
vc.htmlStr = goodsDesc;
vc.delegatedata = self
self.navigationController?.pushViewController(vc, animated: true)
}
//MARK: -- 点击按钮事件,跳转或者展示选择界面
func btnClick(content: String, cell: TitleAndBtnCell) {
......@@ -1593,6 +1597,8 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
var goodsDesc = ""
func getHTMLByVc(_ model: String!) {
goodsDesc = model
listTbv.reloadData()
}
}
......
......@@ -444,15 +444,12 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
cell.imgBtn.tag = indexPath.row
if goodsDesc.count > 0 {
cell.webView.isHidden = false
let request = URLRequest.init(url: URL(string: "https://m.baidu.com/")!)
cell.webView.load(request)
let goodsDescHmtl = "<html>" + goodsDesc + "</html>"
cell.webView.loadHTMLString(goodsDescHmtl, baseURL: nil)
}
cell.imgBtn.setImage(UIImage(named: "tjxq"), for: .normal)
cell.btmH.constant = 25
if goodsDesc.count > 0 {
let goodsDescHmtl = "<html>" + goodsDesc + "</html>"
//增加一个半屏高度web
}
return cell
}
}
......@@ -467,15 +464,12 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
@objc func editHtml(){
print("编辑软文")
let vc = LMNoteViewController()
vc.htmlStr = goodsDesc;
vc.delegatedata = self
self.navigationController?.pushViewController(vc, animated: true)
}
func AddGuiGeCellClick(cell: AddGuiGeCell) {
print("底部广告软文跳转")
goodsDesc = "1"
listTbv.reloadData()
return
let vc = LMNoteViewController()
vc.htmlStr = goodsDesc;
vc.delegatedata = self
......@@ -1069,7 +1063,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
case 4:return 49
default:
if goodsDesc.count > 0 {
return 250
return 450*glscale
}
return 98
......@@ -1233,6 +1227,7 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var goodsDesc = ""
func getHTMLByVc(_ model: String!) {
goodsDesc = model
listTbv.reloadData()
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment