Commit 8be817f7 authored by Sandy's avatar Sandy

加油单列表金额数据改为支付金额

parent 91105394
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>车族通</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.0</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSAppleMusicUsageDescription</key>
<string>App需要您的同意,才能访问媒体资料库</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>App需要您的同意,才能访问蓝牙</string>
<key>NSCalendarsUsageDescription</key>
<string>App需要您的同意,才能访问日历</string>
<key>NSCameraUsageDescription</key>
<string>App需要您的同意,才能访问相机</string>
<key>NSHealthShareUsageDescription</key>
<string>App需要您的同意,才能访问健康分享</string>
<key>NSHealthUpdateUsageDescription</key>
<string>App需要您的同意,才能访问健康更新 </string>
<key>NSLocationAlwaysUsageDescription</key>
<string>App需要您的同意,才能始终访问位置</string>
<key>NSLocationUsageDescription</key>
<string>App需要您的同意,才能访问位置</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>App需要您的同意,才能在使用期间访问位置</string>
<key>NSMicrophoneUsageDescription</key>
<string>App需要您的同意,才能访问麦克风</string>
<key>NSMotionUsageDescription</key>
<string>App需要您的同意,才能访问运动与健身</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>App需要您的同意,才能访问相册</string>
<key>NSRemindersUsageDescription</key>
<string>App需要您的同意,才能访问提醒事项</string>
<key>UIBackgroundModes</key>
<array>
<string>location</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
</dict>
</plist>
This diff is collapsed.
......@@ -8,22 +8,9 @@
#import "AppDelegate.h"
#import "GuideViewController.h"
#import "UMMobClick/MobClick.h"
#import "UMengHelper.h"
#import "JPushHelper.h"
#import "BMKMapManager.h"
#import "JPUSHService.h"
#import "UMMobClick/MobClick.h"
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h> // 这里是iOS10需要用到的框架
#endif
static NSString *const JPUSHAPPKEY = @"5dc63eefddc7955ac9985390"; // 极光appKey
static NSString *const channel = @"蒲公英"; // 固定的
#ifdef DEBUG // 开发
static BOOL const isProduction = FALSE; // 极光FALSE为开发环境
#else // 生产
static BOOL const isProduction = TRUE; // 极光TRUE为生产环境
#endif
@interface AppDelegate ()
{
......@@ -49,85 +36,17 @@ static BOOL const isProduction = TRUE; // 极光TRUE为生产环境
if (!ret) {
NSLog(@"manager start failed!");
}
[self JPUSHConfigWithOptions:launchOptions];
[self UMConfig];
[JPushHelper JPUSHConfigWithOptions:launchOptions];
[UMengHelper UMengStart];
return YES;
}
- (void)UMConfig {
UMConfigInstance.appKey = @"58623721a40fa342b90010f4";
UMConfigInstance.channelId = @"蒲公英";
UMConfigInstance.ePolicy = REALTIME;
[MobClick setLogEnabled:YES];
[MobClick startWithConfigure:UMConfigInstance];
}
- (void)JPUSHConfigWithOptions:(NSDictionary *)launchOptions {
// 注册apns通知
if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) // iOS10
{
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
JPUSHRegisterEntity *entity = [[JPUSHRegisterEntity alloc] init];
entity.types = UNAuthorizationOptionAlert | UNAuthorizationOptionBadge |
UNAuthorizationOptionSound;
[JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
#endif
} else if ([[UIDevice currentDevice].systemVersion floatValue] >=
8.0) // iOS8, iOS9
{
//可以添加自定义categories
[JPUSHService
registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |
UIUserNotificationTypeAlert)
categories:nil];
} else // iOS7
{
// categories 必须为nil
[JPUSHService
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |UIRemoteNotificationTypeSound |UIRemoteNotificationTypeAlert)
categories:nil];
}
/*
* launchingOption 启动参数.
* appKey 一个JPush 应用必须的,唯一的标识.
* channel 发布渠道. 可选.
* isProduction 是否生产环境. 如果为开发状态,设置为 NO; 如果为生产状态,应改为
* YES.
* advertisingIdentifier 广告标识符(IDFA) 如果不需要使用IDFA,传nil.
* 此接口必须在 App 启动时调用, 否则 JPush SDK 将无法正常工作.
*/
// 如不需要使用IDFA,advertisingIdentifier 可为nil
// 注册极光推送
[JPUSHService setupWithOption:launchOptions
appKey:JPUSHAPPKEY
channel:channel
apsForProduction:isProduction
advertisingIdentifier:nil];
// 2.1.9版本新增获取registration id block接口。
[JPUSHService
registrationIDCompletionHandler:^(int resCode, NSString *registrationID) {
if (resCode == 0) {
// iOS10获取registrationID放到这里了, 可以存到缓存里,
// 用来标识用户单独发送推送
NSLog(@"registrationID获取成功:%@", registrationID);
[[NSUserDefaults standardUserDefaults] setObject:registrationID
forKey:@"registrationID"];
[[NSUserDefaults standardUserDefaults] synchronize];
} else {
NSLog(@"registrationID获取失败,code:%d", resCode);
}
}];
}
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// Required - 注册 DeviceToken
[JPUSHService registerDeviceToken:deviceToken];
[JPushHelper registerDeviceToken:deviceToken];
}
- (void)applicationWillResignActive:(UIApplication *)application {
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="mts-cR-GxO">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11542" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="mts-cR-GxO">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
......@@ -1101,7 +1101,7 @@
<rect key="frame" x="0.0" y="28" width="375" height="30"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="WXk-60-mnv" id="Hdv-Fv-6SO">
<rect key="frame" x="0.0" y="0.0" width="375" height="29"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="29.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" tag="1111" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2016-12" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3kb-L7-Q1S">
......@@ -1131,7 +1131,7 @@
<rect key="frame" x="0.0" y="58" width="375" height="60"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="agP-LF-ma6" id="X7Q-g8-dvJ">
<rect key="frame" x="0.0" y="0.0" width="375" height="59"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="59.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="工分结算" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R4g-d8-qvx">
......@@ -1190,7 +1190,7 @@
<!--Order Detail View Controller-->
<scene sceneID="5X2-zN-Isn">
<objects>
<viewController storyboardIdentifier="OrderDetailViewController" id="z0s-bh-tj6" customClass="OrderDetailViewController" sceneMemberID="viewController">
<viewController storyboardIdentifier="OrderDetailViewController" automaticallyAdjustsScrollViewInsets="NO" id="z0s-bh-tj6" customClass="OrderDetailViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="eEq-x0-goT"/>
<viewControllerLayoutGuide type="bottom" id="7fe-xg-1cN"/>
......@@ -1203,7 +1203,7 @@
<rect key="frame" x="0.0" y="20" width="375" height="647"/>
<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>
<view key="tableHeaderView" contentMode="scaleToFill" id="mTF-pL-rui">
<rect key="frame" x="0.0" y="0.0" width="375" height="593"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="631"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hfm-jc-u2I" userLabel="top">
......@@ -1683,7 +1683,7 @@
<constraint firstAttribute="height" constant="1" id="l8W-P5-OBF"/>
</constraints>
</view>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入工号" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="5Ry-9R-HMn">
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入用户名" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="5Ry-9R-HMn">
<rect key="frame" x="60" y="1" width="315" height="58.5"/>
<nil key="textColor"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
......
......@@ -87,6 +87,11 @@
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
kDebugIndex(indexPath);
}
- (void)listDidSelect:(id)model {
}
......
......@@ -21,7 +21,7 @@
self.labelStation.text = [NSString stringWithFormat:@"%@ - %@",model.stationName, model.stationUserName];
self.labelOil.text = [NSString stringWithFormat:@"%@ - %@",model.gasItemName, model.oilGunName];
self.labelBillNumber.text = model.billNumber;
self.labelPrice.text = [CalculateHelper getMoneyStringFrom:model.deduct];
self.labelPrice.text = [CalculateHelper getMoneyStringFrom:model.realPayTotal];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
......
......@@ -64,4 +64,5 @@
}
return _printStateString;
}
@end
......@@ -73,11 +73,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[super tableView:tableView didSelectRowAtIndexPath:indexPath];
#ifdef DEBUG
[MBProgressHUD j_textOnly:[NSString stringWithFormat:@"%lu",indexPath.row + 1]];
#else
#endif
kDebugIndex(indexPath);
}
- (void)listDidSelect:(id)model {
......
......@@ -73,6 +73,7 @@
self.labelPrice.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.total], @"¥");
self.labelVoucher.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.deduct], @"¥");
self.labelRealPrice.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.realPayTotal], @"¥");
self.labelDeduct.text = kStrPrefix([CalculateHelper getMoneyStringFrom:self.model.deduct], @"¥");
self.labelIsInvoice.text = kStrPrefix(self.model.invoiceString, @"是否开票:");
self.labelIsPrint.text = kStrPrefix(self.model.printStateString, @"是否打印:");
self.labelLatestPrintTime.text = kStrPrefix(self.model.lstPrintedTime, @"最后一次打印时间:");
......
......@@ -69,8 +69,6 @@
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
......@@ -45,7 +45,17 @@
#define kNoNullStr(string) (string != nil && [string lenth] > 0 ? string : @"")
//拼接string和prefix,拼接后的格式为prefixstring
#define kStrPrefix(string,prefix) [NSString stringWithFormat:@"%@%@",prefix,string]
#define kStrPrefix(string,prefix) [NSString stringWithFormat:@"%@%@",prefix,[string length] > 0 ? string : @"暂无"]
#ifdef DEBUG
#define kDebugIndex(indexPath) [MBProgressHUD j_textOnly:[NSString stringWithFormat:@"%lu",indexPath.row + 1]];
#else
#define kDebugIndex(indexPath)
#endif
#define kWindow [UIApplication sharedApplication].keyWindow
#define kBounds [UIScreen mainScreen].bounds
......
......@@ -9,8 +9,17 @@
#ifndef URL_h
#define URL_h
#ifdef test
static NSString *const VersionName = @"车族通测试版";
static NSString *const BASE_IP = @"http://test.gomoretech.com";
#else
static NSString *const VersionName = @"车族通正式版";
static NSString *const BASE_IP = @"http://whcar.gomoretech.com";
#endif
/** 请求基准地址 */
#define REST_BASE_URL [NSString stringWithFormat:@"%@/car-web/app", BASE_IP]
......
......@@ -11,10 +11,10 @@
@implementation UITableView (Addtions)
- (void)j_endRefresh {
if ([self.mj_header isRefreshing]) {
// if ([self.mj_header isRefreshing]) {
[self.mj_header endRefreshing];
}else if ([self.mj_footer isRefreshing]) {
// }else if ([self.mj_footer isRefreshing]) {
[self.mj_footer endRefreshing];
}
// }
}
@end
//
// JPushHelper.h
// Car
//
// Created by Javen on 2016/12/29.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import <Foundation/Foundation.h>
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h> // 这里是iOS10需要用到的框架
#endif
@interface JPushHelper : NSObject
+ (void)JPUSHConfigWithOptions:(NSDictionary *)launchOptions;
/**
注册token
@param deviceToken deviceToken description
*/
+ (void)registerDeviceToken:(NSData *)deviceToken;
@end
//
// JPushHelper.m
// Car
//
// Created by Javen on 2016/12/29.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import "JPushHelper.h"
#import "JPUSHService.h"
static NSString *const JPUSHAPPKEY = @"5dc63eefddc7955ac9985390"; // 极光appKey
static NSString *const channel = @"蒲公英"; // 固定的
#ifdef DEBUG // 开发
static BOOL const isProduction = FALSE; // 极光FALSE为开发环境
#else // 生产
static BOOL const isProduction = TRUE; // 极光TRUE为生产环境
#endif
@implementation JPushHelper
+ (void)JPUSHConfigWithOptions:(NSDictionary *)launchOptions {
// 注册apns通知
if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) // iOS10
{
#ifdef NSFoundationVersionNumber_iOS_9_x_Max
JPUSHRegisterEntity *entity = [[JPUSHRegisterEntity alloc] init];
entity.types = UNAuthorizationOptionAlert | UNAuthorizationOptionBadge |
UNAuthorizationOptionSound;
[JPUSHService registerForRemoteNotificationConfig:entity delegate:self];
#endif
} else if ([[UIDevice currentDevice].systemVersion floatValue] >=
8.0) // iOS8, iOS9
{
//可以添加自定义categories
[JPUSHService
registerForRemoteNotificationTypes:(UIUserNotificationTypeBadge |
UIUserNotificationTypeSound |
UIUserNotificationTypeAlert)
categories:nil];
} else // iOS7
{
// categories 必须为nil
[JPUSHService
registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound |
UIRemoteNotificationTypeAlert)
categories:nil];
}
/*
* launchingOption 启动参数.
* appKey 一个JPush 应用必须的,唯一的标识.
* channel 发布渠道. 可选.
* isProduction 是否生产环境. 如果为开发状态,设置为 NO; 如果为生产状态,应改为
* YES.
* advertisingIdentifier 广告标识符(IDFA) 如果不需要使用IDFA,传nil.
* 此接口必须在 App 启动时调用, 否则 JPush SDK 将无法正常工作.
*/
// 如不需要使用IDFA,advertisingIdentifier 可为nil
// 注册极光推送
[JPUSHService setupWithOption:launchOptions
appKey:JPUSHAPPKEY
channel:channel
apsForProduction:isProduction
advertisingIdentifier:nil];
// 2.1.9版本新增获取registration id block接口。
[JPUSHService
registrationIDCompletionHandler:^(int resCode, NSString *registrationID) {
if (resCode == 0) {
// iOS10获取registrationID放到这里了, 可以存到缓存里,
// 用来标识用户单独发送推送
NSLog(@"registrationID获取成功:%@", registrationID);
[[NSUserDefaults standardUserDefaults] setObject:registrationID
forKey:@"registrationID"];
[[NSUserDefaults standardUserDefaults] synchronize];
} else {
NSLog(@"registrationID获取失败,code:%d", resCode);
}
}];
}
+ (void)registerDeviceToken:(NSData *)deviceToken {
[JPUSHService registerDeviceToken:deviceToken];
}
@end
//
// UMengHelper.h
// Car
//
// Created by Javen on 2016/12/29.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface UMengHelper : NSObject
+ (void)UMengStart;
@end
//
// UMengHelper.m
// Car
//
// Created by Javen on 2016/12/29.
// Copyright © 2016年 上海勾芒信息科技. All rights reserved.
//
#import "UMengHelper.h"
#import "UMMobClick/MobClick.h"
@implementation UMengHelper
+ (void)UMengStart {
UMConfigInstance.appKey = @"58623721a40fa342b90010f4";
UMConfigInstance.channelId = @"蒲公英";
UMConfigInstance.ePolicy = REALTIME;
[MobClick setLogEnabled:YES];
[MobClick startWithConfigure:UMConfigInstance];
}
@end
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