Commit 83cc703f authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

1.push config

2.h5 webView
parent 53ddfa42
...@@ -897,8 +897,8 @@ ...@@ -897,8 +897,8 @@
A9C2B8AB24D039B400010EAE /* GoodsManager */ = { A9C2B8AB24D039B400010EAE /* GoodsManager */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A9C2B8AC24D039B400010EAE /* ZJGoodsMagager.m */,
A9C2B8AD24D039B400010EAE /* ZJGoodsMagager.h */, A9C2B8AD24D039B400010EAE /* ZJGoodsMagager.h */,
A9C2B8AC24D039B400010EAE /* ZJGoodsMagager.m */,
); );
path = GoodsManager; path = GoodsManager;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1293,19 +1293,19 @@ ...@@ -1293,19 +1293,19 @@
A9C2B97424D039B400010EAE /* Base */ = { A9C2B97424D039B400010EAE /* Base */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A9C2B97D24D039B400010EAE /* UIKitInit.swift */,
A9C2B97524D039B400010EAE /* Constants.swift */,
A9C2BA4524D03E9A00010EAE /* Dolphins-Bridging-Header.h */, A9C2BA4524D03E9A00010EAE /* Dolphins-Bridging-Header.h */,
A9C2B97E24D039B400010EAE /* BaseTabBarViewController.h */, A9C2B97E24D039B400010EAE /* BaseTabBarViewController.h */,
A9C2B97724D039B400010EAE /* BaseTabBarViewController.m */, A9C2B97724D039B400010EAE /* BaseTabBarViewController.m */,
A9C2B97524D039B400010EAE /* Constants.swift */, A9C2B98124D039B400010EAE /* BaseWebViewController.h */,
A9C2B97624D039B400010EAE /* BaseWebViewController.m */, A9C2B97624D039B400010EAE /* BaseWebViewController.m */,
A9C2B97824D039B400010EAE /* BaseTableViewController.m */, A9C2B97824D039B400010EAE /* BaseTableViewController.m */,
A9C2B97924D039B400010EAE /* BaseViewController.m */, A9C2B97924D039B400010EAE /* BaseViewController.m */,
A9C2B97A24D039B400010EAE /* BaseModel.m */, A9C2B97A24D039B400010EAE /* BaseModel.m */,
A9C2B97B24D039B400010EAE /* BaseNavigationViewController.h */, A9C2B97B24D039B400010EAE /* BaseNavigationViewController.h */,
A9C2B97D24D039B400010EAE /* UIKitInit.swift */,
A9C2B97F24D039B400010EAE /* APPNavigationBar.swift */, A9C2B97F24D039B400010EAE /* APPNavigationBar.swift */,
A9C2B98024D039B400010EAE /* APPTabBar.swift */, A9C2B98024D039B400010EAE /* APPTabBar.swift */,
A9C2B98124D039B400010EAE /* BaseWebViewController.h */,
A9C2B98224D039B400010EAE /* BaseTableViewController.h */, A9C2B98224D039B400010EAE /* BaseTableViewController.h */,
A9C2B98324D039B400010EAE /* BaseNavigationViewController.m */, A9C2B98324D039B400010EAE /* BaseNavigationViewController.m */,
A9C2B98424D039B400010EAE /* BaseHead.h */, A9C2B98424D039B400010EAE /* BaseHead.h */,
...@@ -1632,7 +1632,7 @@ ...@@ -1632,7 +1632,7 @@
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh; shellPath = /bin/sh;
shellScript = "#!/bin/sh\n#\n# Copyright 2016 Bugly, Tencent. All rights reserved.\n#\n# V1.4.0\n#\n# 2016.08.03\n#\n#\n#\n######################################################\n# 1. 脚本集成到Xcode工程的Target\n######################################################\n#\n# --- Copy the SCRIPT to the Run Script of Build Phases in the Xcode project ---\n#\n# #\nBUGLY_APP_ID=\"560c1b40a9\"\n# #\nBUGLY_APP_KEY=\"aeab7115-3cfb-43eb-991a-4154dac911d9\"\n# #\nBUNDLE_IDENTIFIER=\"com.app.zhiji\"\n# #\nUPLOAD_DSYM_ONLY=1\n#\n# # 脚本默认配置的版本格式为CFBundleShortVersionString(CFBundleVersion), 如果你修改默认的版本格式, 请设置此变量, 如果不想修改, 请忽略此设置\n# CUSTOMIZED_APP_VERSION=\"\"\n#\n# # Debug模式编译是否上传,1=上传 0=不上传,默认不上传\n# UPLOAD_DEBUG_SYMBOLS=0\n#\n# # 模拟器编译是否上传,1=上传 0=不上传,默认不上传\n# UPLOAD_SIMULATOR_SYMBOLS=0\n#\n# #只有Archive操作时上传, 1=支持Archive上传 0=所有Release模式编译都上传\n# UPLOAD_ARCHIVE_ONLY=0\n#\n# #\n# source dSYMUpload.sh\n#\n# --- END OF SCRIPT ---\n#\n#\n#\n#\n#######################################################\n# 2. 脚本根据输入参数处理\n#######################################################\n#\n# #命令行下输入应用基本信息, .dSYM文件的父目录路径, 输出文件目录即可\n#\n# sh dSYMUpload.sh <bugly_app_id> <bugly_app_key> <app_bundle_identifier> <app_version> <dSYM_src_dir> <bSYMBOL_dest_dir>\n#\n# #\n#\n# #注意:\n# # 1. dSYMUpload.sh会调用buglySymboliOS.jar进行.dSYM解析,所以依赖Java运行时环境\n# # 2. dSYMUpload.sh和buglySymboliOS.jar的文件路径需一致\n#\n#\n\n#\n# --- CONTENT OF SCRIPT ---\n#\n\n# Bugly服务域名\nBUGLY_DSYM_UPLOAD_DOMAIN=\"api.bugly.qq.com\"\n\n# 注意jar工具的路径跟dSYMUpload.sh脚本路径一致, 请务必保证jar路径的正确性\nBUGLY_SYMBOL_JAR_PATH=\"dsymtool/buglySymboliOS.jar\"\n# 查找添加到系统目录的jar工具\nif [ ! -f \"${BUGLY_SYMBOL_JAR_PATH}\" ]; then\n BUGLY_SYMBOL_JAR_PATH=\"$HOME/bin/buglySymboliOS.jar\"\nfi\n\n# 打印错误信息\nfunction exitWithMessage(){\n echo \"--------------------------------\"\n echo \"${1}\"\n echo \"--------------------------------\"\n exit ${2}\n}\n\n# 上传bSYMBOL文件\nfunction dSYMUpload() {\n P_APP_ID=\"$1\"\n P_APP_KEY=\"$2\"\n P_APP_BUNDLE_ID=\"$3\"\n P_APP_VERSION=\"$4\"\n P_BSYMBOL_ZIP_FILE=\"$5\"\n\n #\n P_BSYMBOL_ZIP_FILE_NAME=${P_BSYMBOL_ZIP_FILE##*/}\n P_BSYMBOL_ZIP_FILE_NAME=${P_BSYMBOL_ZIP_FILE_NAME//&/_}\n P_BSYMBOL_ZIP_FILE_NAME=\"${P_BSYMBOL_ZIP_FILE_NAME// /_}\"\n\n DSYM_UPLOAD_URL=\"https://${BUGLY_DSYM_UPLOAD_DOMAIN}/openapi/file/upload/symbol?app_id=${P_APP_ID}&app_key=${P_APP_KEY}\"\n echo \"dSYM upload url: ${DSYM_UPLOAD_URL}\"\n\n echo \"-----------------------------\"\n STATUS=$(/usr/bin/curl -k \"${DSYM_UPLOAD_URL}\" --form \"api_version=1\" --form \"app_id=${P_APP_ID}\" --form \"app_key=${P_APP_KEY}\" --form \"symbolType=2\" --form \"bundleId=${BUNDLE_IDENTIFIER}\" --form \"productVersion=${BUGLY_APP_VERSION}\" --form \"fileName=${P_BSYMBOL_ZIP_FILE_NAME}\" --form \"file=@${P_BSYMBOL_ZIP_FILE}\" --verbose)\n echo \"-----------------------------\"\n\n UPLOAD_RESULT=\"FAILTURE\"\n echo \"Bugly server response: ${STATUS}\"\n if [ ! \"${STATUS}\" ]; then\n echo \"Error: Failed to upload the zip archive file.\"\n elif [[ \"${STATUS}\" == *\"{\\\"reponseCode\\\":\\\"0\\\"}\"* ]]; then\n echo \"Success to upload the dSYM for the app [${BUNDLE_IDENTIFIER} ${BUGLY_APP_VERSION}]\"\n UPLOAD_RESULT=\"SUCCESS\"\n else\n echo \"Error: Failed to upload the zip archive file to Bugly.\"\n fi\n\n #Remove temp dSYM archive\n #echo \"Remove temporary zip archive: ${DSYM_ZIP_FPATH}\"\n #/bin/rm -f \"${DSYM_ZIP_FPATH}\"\n\n if [ \"$?\" -ne 0 ]; then\n exitWithMessage \"Error: Failed to remove temporary zip archive.\" 0\n fi\n\n echo \"--------------------------------\"\n echo \"${UPLOAD_RESULT} - dSYM upload complete.\"\n\n if [[ \"${UPLOAD_RESULT}\" == \"FAILTURE\" ]]; then\n echo \"--------------------------------\"\n echo \"Failed to upload the dSYM\"\n echo \"Please check the script and try it again.\"\n fi\n}\n\n# .dSYM解析为bSYMBOL文件\nfunction dSYMParse() {\n DSYM_FILE=\"$1\"\n DSYM_SYMBOL_FILE=\"$2\"\n\n echo \"--------------------------------\"\n echo \"Extract symbol info from .dSYM file. to ${DSYM_SYMBOL_FILE}\"\n (/usr/bin/java -Xms512m -Xmx1024m -Dfile.encoding=UTF8 -jar \"${BUGLY_SYMBOL_JAR_PATH}\" -i \"${DSYM_FILE}\" -o \"${DSYM_SYMBOL_FILE}\" ) || exitWithMessage \"Error: Failed to extract symbols.\" 1\n echo \"--------------------------------\"\n\n}\n\n# 执行\nfunction run() {\n\n CONFIG_BUGLY_APP_ID=\"$1\"\n CONFIG_BUGLY_APP_KEY=\"$2\"\n\n CONFIG_BUGLY_APP_BUNDLE_IDENTIFIER=\"$3\"\n CONFIG_BUGLY_APP_VERSION=\"$4\"\n CONFIG_DSYM_SOURCE_DIR=\"$5\"\n CONFIG_DSYM_DEST_DIR=\"$6\"\n CONFIG_UPLOAD_DSYM_ONLY=\"$7\"\n\n # 检查必须参数是否设置\n if [ ! \"${CONFIG_BUGLY_APP_ID}\" ]; then\n exitWithMessage \"Error: Bugly App ID not defined. Please set 'BUGLY_APP_ID' \" 0\n fi\n\n if [[ \"${CONFIG_BUGLY_APP_ID}\" == *\"App ID\"* ]]; then\n exitWithMessage \"Error: Bugly App ID not defined.\" 0\n fi\n\n if [ ! \"${CONFIG_BUGLY_APP_KEY}\" ]; then\n exitWithMessage \"Error: Bugly App Key not defined.\" 0\n fi\n\n if [ ! \"${CONFIG_BUGLY_APP_BUNDLE_IDENTIFIER}\" ]; then\n exitWithMessage \"Error: Bundle Identifier not defined.\" 0\n fi\n\n if [ ! \"${CONFIG_BUGLY_APP_VERSION}\" ]; then\n exitWithMessage \"Error: App Version not defined.\" 0\n fi\n\n if [ ! -e \"${CONFIG_DSYM_SOURCE_DIR}\" ]; then\n exitWithMessage \"Error: Invalid dir ${CONFIG_DSYM_SOURCE_DIR}\" 0\n fi\n\n if [ ! \"${CONFIG_DSYM_DEST_DIR}\" ]; then\n exitWithMessage \"Error: Invalid dir ${CONFIG_DSYM_DEST_DIR}\" 0\n fi\n\n if [ ! -e \"${CONFIG_DSYM_DEST_DIR}\" ]; then\n mkdir ${CONFIG_DSYM_DEST_DIR}\n fi\n\n DSYM_FOLDER=\"${CONFIG_DSYM_SOURCE_DIR}\"\n IFS=$'\\n'\n\n echo \"Scaning dSYM FOLDER: ${DSYM_FOLDER} ...\"\n RET=\"F\"\n \n #\n for dsymFile in $(find \"$DSYM_FOLDER\" -name '*.dSYM'); do\n RET=\"T\"\n echo \"Found dSYM file: $dsymFile\"\n\n DSYM_FILE_NAME=${dsymFile##*/}\n DSYM_SYMBOL_ZIP_FILE_NAME=\"${DSYM_FILE_NAME}.zip\"\n DSYM_SYMBOL_ZIP_FILE_NAME=\"${DSYM_SYMBOL_ZIP_FILE_NAME// /_}\"\n DSYM_SYMBOL_ZIP_FILE=${CONFIG_DSYM_DEST_DIR}/${DSYM_SYMBOL_ZIP_FILE_NAME}\n\n if [ $CONFIG_UPLOAD_DSYM_ONLY -eq 1 ]; then\n if [ -e $DSYM_SYMBOL_ZIP_FILE ]; then\n rm -f $DSYM_SYMBOL_ZIP_FILE\n fi\n # 如果只上传dSYM,直接压缩dSYM目录\n zip -r -j $DSYM_SYMBOL_ZIP_FILE $dsymFile -x *.plist\n else\n # 使用符号表工具来生成Symbol文件\n dSYMParse $dsymFile $DSYM_SYMBOL_ZIP_FILE\n fi\n \n # 上传\n dSYMUpload $CONFIG_BUGLY_APP_ID $CONFIG_BUGLY_APP_KEY $CONFIG_BUGLY_APP_BUNDLE_IDENTIFIER $CONFIG_BUGLY_APP_VERSION $DSYM_SYMBOL_ZIP_FILE\n done\n\n if [ $RET = \"F\" ]; then\n exitWithMessage \"No .dSYM found in ${DSYM_FOLDER}\" 0\n fi\n}\n\n# 在Xcode工程中执行\nfunction runInXcode(){\n echo \"Uploading dSYM to Bugly in Xcode ...\"\n\n echo \"Info.Plist : ${INFOPLIST_FILE}\"\n\n BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' \"${INFOPLIST_FILE}\")\n BUNDLE_SHORT_VERSION=$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' \"${INFOPLIST_FILE}\")\n\n # 组装Bugly默认识别的版本信息(格式为CFBundleShortVersionString(CFBundleVersion), 例如: 1.0(1))\n if [ ! \"${CUSTOMIZED_APP_VERSION}\" ]; then\n BUGLY_APP_VERSION=\"${BUNDLE_SHORT_VERSION}(${BUNDLE_VERSION})\"\n else\n BUGLY_APP_VERSION=\"${CUSTOMIZED_APP_VERSION}\"\n fi\n\n echo \"--------------------------------\"\n echo \"Prepare application information.\"\n echo \"--------------------------------\"\n\n echo \"Product Name: ${PRODUCT_NAME}\"\n echo \"Bundle Identifier: ${BUNDLE_IDENTIFIER}\"\n echo \"Version: ${BUNDLE_SHORT_VERSION}\"\n echo \"Build: ${BUNDLE_VERSION}\"\n\n echo \"Bugly App ID: ${BUGLY_APP_ID}\"\n echo \"Bugly App key: ${BUGLY_APP_KEY}\"\n echo \"Bugly App Version: ${BUGLY_APP_VERSION}\"\n\n echo \"--------------------------------\"\n echo \"Check the arguments ...\"\n\n ##检查模拟器编译是否允许上传符号\n if [ \"$EFFECTIVE_PLATFORM_NAME\" == \"-iphonesimulator\" ]; then\n if [ $UPLOAD_SIMULATOR_SYMBOLS -eq 0 ]; then\n exitWithMessage \"Warning: Build for simulator and skipping to upload. \\nYou can modify 'UPLOAD_SIMULATOR_SYMBOLS' to 1 in the script.\" 0\n fi\n fi\n\n ##检查是否是Release模式编译\n if [ \"${CONFIGURATION=}\" == \"Debug\" ]; then\n if [ $UPLOAD_DEBUG_SYMBOLS -eq 0 ]; then\n exitWithMessage \"Warning: Build for debug mode and skipping to upload. \\nYou can modify 'UPLOAD_DEBUG_SYMBOLS' to 1 in the script.\" 0\n fi\n fi\n\n ##检查是否Archive操作\n if [ $UPLOAD_ARCHIVE_ONLY -eq 1 ]; then\n if [[ \"$TARGET_BUILD_DIR\" == *\"/Archive\"* ]]; then\n echo \"Archive the package\"\n else\n exitWithMessage \"Warning: Build for NOT Archive mode and skipping to upload. \\nYou can modify 'UPLOAD_ARCHIVE_ONLY' to 0 in the script.\" 0\n fi\n fi\n\n #\n run ${BUGLY_APP_ID} ${BUGLY_APP_KEY} ${BUNDLE_IDENTIFIER} ${BUGLY_APP_VERSION} ${DWARF_DSYM_FOLDER_PATH} ${BUILD_DIR}/BuglySymbolTemp ${UPLOAD_DSYM_ONLY}\n}\n\n# 根据Xcode的环境变量判断是否处于Xcode环境\nINFO_PLIST_FILE=\"${INFOPLIST_FILE}\"\n\nBuildInXcode=\"F\"\nif [ -f \"${INFO_PLIST_FILE}\" ]; then\n BuildInXcode=\"T\"\nfi\n\nif [ $BuildInXcode = \"T\" ]; then\n runInXcode\nelse\n echo \"\\nUsage: dSYMUpload.sh <bugly_app_id> <bugly_app_key> <app_bundle_identifier> <app_version> <dSYM_src_dir> <bSYMBOL_dest_dir> [upload_dsym_only]\\n\"\n # 你可以在此处直接设置BuglyAppID和BuglyAppKey,排除不常变参数的输入\n BUGLY_APP_ID=\"$1\"\n BUGLY_APP_KEY=\"$2\"\n BUNDLE_IDENTIFIER=\"$3\"\n BUGLY_APP_VERSION=\"$4\"\n DWARF_DSYM_FOLDER_PATH=\"$5\"\n SYMBOL_OUTPUT_PATH=\"$6\"\n UPLOAD_DSYM_ONLY=$7\n run ${BUGLY_APP_ID} ${BUGLY_APP_KEY} ${BUNDLE_IDENTIFIER} ${BUGLY_APP_VERSION} ${DWARF_DSYM_FOLDER_PATH} ${SYMBOL_OUTPUT_PATH} ${UPLOAD_DSYM_ONLY}\nfi\n\n"; shellScript = "#!/bin/sh\n#\n# Copyright 2016 Bugly, Tencent. All rights reserved.\n#\n# V1.4.0\n#\n# 2016.08.03\n#\n#\n#\n######################################################\n# 1. 脚本集成到Xcode工程的Target\n######################################################\n#\n# --- Copy the SCRIPT to the Run Script of Build Phases in the Xcode project ---\n#\n# #\nBUGLY_APP_ID=\"3339c2079b\"\n# #\nBUGLY_APP_KEY=\"5c3a4f2c-c004-48aa-a40c-365ef48a7f23\"\n# #\nBUNDLE_IDENTIFIER=\"com.app.dolphinsguard\"\n# #\nUPLOAD_DSYM_ONLY=1\n#\n# # 脚本默认配置的版本格式为CFBundleShortVersionString(CFBundleVersion), 如果你修改默认的版本格式, 请设置此变量, 如果不想修改, 请忽略此设置\n# CUSTOMIZED_APP_VERSION=\"\"\n#\n# # Debug模式编译是否上传,1=上传 0=不上传,默认不上传\n# UPLOAD_DEBUG_SYMBOLS=0\n#\n# # 模拟器编译是否上传,1=上传 0=不上传,默认不上传\n# UPLOAD_SIMULATOR_SYMBOLS=0\n#\n# #只有Archive操作时上传, 1=支持Archive上传 0=所有Release模式编译都上传\n# UPLOAD_ARCHIVE_ONLY=0\n#\n# #\n# source dSYMUpload.sh\n#\n# --- END OF SCRIPT ---\n#\n#\n#\n#\n#######################################################\n# 2. 脚本根据输入参数处理\n#######################################################\n#\n# #命令行下输入应用基本信息, .dSYM文件的父目录路径, 输出文件目录即可\n#\n# sh dSYMUpload.sh <bugly_app_id> <bugly_app_key> <app_bundle_identifier> <app_version> <dSYM_src_dir> <bSYMBOL_dest_dir>\n#\n# #\n#\n# #注意:\n# # 1. dSYMUpload.sh会调用buglySymboliOS.jar进行.dSYM解析,所以依赖Java运行时环境\n# # 2. dSYMUpload.sh和buglySymboliOS.jar的文件路径需一致\n#\n#\n\n#\n# --- CONTENT OF SCRIPT ---\n#\n\n# Bugly服务域名\nBUGLY_DSYM_UPLOAD_DOMAIN=\"api.bugly.qq.com\"\n\n# 注意jar工具的路径跟dSYMUpload.sh脚本路径一致, 请务必保证jar路径的正确性\nBUGLY_SYMBOL_JAR_PATH=\"dsymtool/buglySymboliOS.jar\"\n# 查找添加到系统目录的jar工具\nif [ ! -f \"${BUGLY_SYMBOL_JAR_PATH}\" ]; then\n BUGLY_SYMBOL_JAR_PATH=\"$HOME/bin/buglySymboliOS.jar\"\nfi\n\n# 打印错误信息\nfunction exitWithMessage(){\n echo \"--------------------------------\"\n echo \"${1}\"\n echo \"--------------------------------\"\n exit ${2}\n}\n\n# 上传bSYMBOL文件\nfunction dSYMUpload() {\n P_APP_ID=\"$1\"\n P_APP_KEY=\"$2\"\n P_APP_BUNDLE_ID=\"$3\"\n P_APP_VERSION=\"$4\"\n P_BSYMBOL_ZIP_FILE=\"$5\"\n\n #\n P_BSYMBOL_ZIP_FILE_NAME=${P_BSYMBOL_ZIP_FILE##*/}\n P_BSYMBOL_ZIP_FILE_NAME=${P_BSYMBOL_ZIP_FILE_NAME//&/_}\n P_BSYMBOL_ZIP_FILE_NAME=\"${P_BSYMBOL_ZIP_FILE_NAME// /_}\"\n\n DSYM_UPLOAD_URL=\"https://${BUGLY_DSYM_UPLOAD_DOMAIN}/openapi/file/upload/symbol?app_id=${P_APP_ID}&app_key=${P_APP_KEY}\"\n echo \"dSYM upload url: ${DSYM_UPLOAD_URL}\"\n\n echo \"-----------------------------\"\n STATUS=$(/usr/bin/curl -k \"${DSYM_UPLOAD_URL}\" --form \"api_version=1\" --form \"app_id=${P_APP_ID}\" --form \"app_key=${P_APP_KEY}\" --form \"symbolType=2\" --form \"bundleId=${BUNDLE_IDENTIFIER}\" --form \"productVersion=${BUGLY_APP_VERSION}\" --form \"fileName=${P_BSYMBOL_ZIP_FILE_NAME}\" --form \"file=@${P_BSYMBOL_ZIP_FILE}\" --verbose)\n echo \"-----------------------------\"\n\n UPLOAD_RESULT=\"FAILTURE\"\n echo \"Bugly server response: ${STATUS}\"\n if [ ! \"${STATUS}\" ]; then\n echo \"Error: Failed to upload the zip archive file.\"\n elif [[ \"${STATUS}\" == *\"{\\\"reponseCode\\\":\\\"0\\\"}\"* ]]; then\n echo \"Success to upload the dSYM for the app [${BUNDLE_IDENTIFIER} ${BUGLY_APP_VERSION}]\"\n UPLOAD_RESULT=\"SUCCESS\"\n else\n echo \"Error: Failed to upload the zip archive file to Bugly.\"\n fi\n\n #Remove temp dSYM archive\n #echo \"Remove temporary zip archive: ${DSYM_ZIP_FPATH}\"\n #/bin/rm -f \"${DSYM_ZIP_FPATH}\"\n\n if [ \"$?\" -ne 0 ]; then\n exitWithMessage \"Error: Failed to remove temporary zip archive.\" 0\n fi\n\n echo \"--------------------------------\"\n echo \"${UPLOAD_RESULT} - dSYM upload complete.\"\n\n if [[ \"${UPLOAD_RESULT}\" == \"FAILTURE\" ]]; then\n echo \"--------------------------------\"\n echo \"Failed to upload the dSYM\"\n echo \"Please check the script and try it again.\"\n fi\n}\n\n# .dSYM解析为bSYMBOL文件\nfunction dSYMParse() {\n DSYM_FILE=\"$1\"\n DSYM_SYMBOL_FILE=\"$2\"\n\n echo \"--------------------------------\"\n echo \"Extract symbol info from .dSYM file. to ${DSYM_SYMBOL_FILE}\"\n (/usr/bin/java -Xms512m -Xmx1024m -Dfile.encoding=UTF8 -jar \"${BUGLY_SYMBOL_JAR_PATH}\" -i \"${DSYM_FILE}\" -o \"${DSYM_SYMBOL_FILE}\" ) || exitWithMessage \"Error: Failed to extract symbols.\" 1\n echo \"--------------------------------\"\n\n}\n\n# 执行\nfunction run() {\n\n CONFIG_BUGLY_APP_ID=\"$1\"\n CONFIG_BUGLY_APP_KEY=\"$2\"\n\n CONFIG_BUGLY_APP_BUNDLE_IDENTIFIER=\"$3\"\n CONFIG_BUGLY_APP_VERSION=\"$4\"\n CONFIG_DSYM_SOURCE_DIR=\"$5\"\n CONFIG_DSYM_DEST_DIR=\"$6\"\n CONFIG_UPLOAD_DSYM_ONLY=\"$7\"\n\n # 检查必须参数是否设置\n if [ ! \"${CONFIG_BUGLY_APP_ID}\" ]; then\n exitWithMessage \"Error: Bugly App ID not defined. Please set 'BUGLY_APP_ID' \" 0\n fi\n\n if [[ \"${CONFIG_BUGLY_APP_ID}\" == *\"App ID\"* ]]; then\n exitWithMessage \"Error: Bugly App ID not defined.\" 0\n fi\n\n if [ ! \"${CONFIG_BUGLY_APP_KEY}\" ]; then\n exitWithMessage \"Error: Bugly App Key not defined.\" 0\n fi\n\n if [ ! \"${CONFIG_BUGLY_APP_BUNDLE_IDENTIFIER}\" ]; then\n exitWithMessage \"Error: Bundle Identifier not defined.\" 0\n fi\n\n if [ ! \"${CONFIG_BUGLY_APP_VERSION}\" ]; then\n exitWithMessage \"Error: App Version not defined.\" 0\n fi\n\n if [ ! -e \"${CONFIG_DSYM_SOURCE_DIR}\" ]; then\n exitWithMessage \"Error: Invalid dir ${CONFIG_DSYM_SOURCE_DIR}\" 0\n fi\n\n if [ ! \"${CONFIG_DSYM_DEST_DIR}\" ]; then\n exitWithMessage \"Error: Invalid dir ${CONFIG_DSYM_DEST_DIR}\" 0\n fi\n\n if [ ! -e \"${CONFIG_DSYM_DEST_DIR}\" ]; then\n mkdir ${CONFIG_DSYM_DEST_DIR}\n fi\n\n DSYM_FOLDER=\"${CONFIG_DSYM_SOURCE_DIR}\"\n IFS=$'\\n'\n\n echo \"Scaning dSYM FOLDER: ${DSYM_FOLDER} ...\"\n RET=\"F\"\n \n #\n for dsymFile in $(find \"$DSYM_FOLDER\" -name '*.dSYM'); do\n RET=\"T\"\n echo \"Found dSYM file: $dsymFile\"\n\n DSYM_FILE_NAME=${dsymFile##*/}\n DSYM_SYMBOL_ZIP_FILE_NAME=\"${DSYM_FILE_NAME}.zip\"\n DSYM_SYMBOL_ZIP_FILE_NAME=\"${DSYM_SYMBOL_ZIP_FILE_NAME// /_}\"\n DSYM_SYMBOL_ZIP_FILE=${CONFIG_DSYM_DEST_DIR}/${DSYM_SYMBOL_ZIP_FILE_NAME}\n\n if [ $CONFIG_UPLOAD_DSYM_ONLY -eq 1 ]; then\n if [ -e $DSYM_SYMBOL_ZIP_FILE ]; then\n rm -f $DSYM_SYMBOL_ZIP_FILE\n fi\n # 如果只上传dSYM,直接压缩dSYM目录\n zip -r -j $DSYM_SYMBOL_ZIP_FILE $dsymFile -x *.plist\n else\n # 使用符号表工具来生成Symbol文件\n dSYMParse $dsymFile $DSYM_SYMBOL_ZIP_FILE\n fi\n \n # 上传\n dSYMUpload $CONFIG_BUGLY_APP_ID $CONFIG_BUGLY_APP_KEY $CONFIG_BUGLY_APP_BUNDLE_IDENTIFIER $CONFIG_BUGLY_APP_VERSION $DSYM_SYMBOL_ZIP_FILE\n done\n\n if [ $RET = \"F\" ]; then\n exitWithMessage \"No .dSYM found in ${DSYM_FOLDER}\" 0\n fi\n}\n\n# 在Xcode工程中执行\nfunction runInXcode(){\n echo \"Uploading dSYM to Bugly in Xcode ...\"\n\n echo \"Info.Plist : ${INFOPLIST_FILE}\"\n\n BUNDLE_VERSION=$(/usr/libexec/PlistBuddy -c 'Print CFBundleVersion' \"${INFOPLIST_FILE}\")\n BUNDLE_SHORT_VERSION=$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' \"${INFOPLIST_FILE}\")\n\n # 组装Bugly默认识别的版本信息(格式为CFBundleShortVersionString(CFBundleVersion), 例如: 1.0(1))\n if [ ! \"${CUSTOMIZED_APP_VERSION}\" ]; then\n BUGLY_APP_VERSION=\"${BUNDLE_SHORT_VERSION}(${BUNDLE_VERSION})\"\n else\n BUGLY_APP_VERSION=\"${CUSTOMIZED_APP_VERSION}\"\n fi\n\n echo \"--------------------------------\"\n echo \"Prepare application information.\"\n echo \"--------------------------------\"\n\n echo \"Product Name: ${PRODUCT_NAME}\"\n echo \"Bundle Identifier: ${BUNDLE_IDENTIFIER}\"\n echo \"Version: ${BUNDLE_SHORT_VERSION}\"\n echo \"Build: ${BUNDLE_VERSION}\"\n\n echo \"Bugly App ID: ${BUGLY_APP_ID}\"\n echo \"Bugly App key: ${BUGLY_APP_KEY}\"\n echo \"Bugly App Version: ${BUGLY_APP_VERSION}\"\n\n echo \"--------------------------------\"\n echo \"Check the arguments ...\"\n\n ##检查模拟器编译是否允许上传符号\n if [ \"$EFFECTIVE_PLATFORM_NAME\" == \"-iphonesimulator\" ]; then\n if [ $UPLOAD_SIMULATOR_SYMBOLS -eq 0 ]; then\n exitWithMessage \"Warning: Build for simulator and skipping to upload. \\nYou can modify 'UPLOAD_SIMULATOR_SYMBOLS' to 1 in the script.\" 0\n fi\n fi\n\n ##检查是否是Release模式编译\n if [ \"${CONFIGURATION=}\" == \"Debug\" ]; then\n if [ $UPLOAD_DEBUG_SYMBOLS -eq 0 ]; then\n exitWithMessage \"Warning: Build for debug mode and skipping to upload. \\nYou can modify 'UPLOAD_DEBUG_SYMBOLS' to 1 in the script.\" 0\n fi\n fi\n\n ##检查是否Archive操作\n if [ $UPLOAD_ARCHIVE_ONLY -eq 1 ]; then\n if [[ \"$TARGET_BUILD_DIR\" == *\"/Archive\"* ]]; then\n echo \"Archive the package\"\n else\n exitWithMessage \"Warning: Build for NOT Archive mode and skipping to upload. \\nYou can modify 'UPLOAD_ARCHIVE_ONLY' to 0 in the script.\" 0\n fi\n fi\n\n #\n run ${BUGLY_APP_ID} ${BUGLY_APP_KEY} ${BUNDLE_IDENTIFIER} ${BUGLY_APP_VERSION} ${DWARF_DSYM_FOLDER_PATH} ${BUILD_DIR}/BuglySymbolTemp ${UPLOAD_DSYM_ONLY}\n}\n\n# 根据Xcode的环境变量判断是否处于Xcode环境\nINFO_PLIST_FILE=\"${INFOPLIST_FILE}\"\n\nBuildInXcode=\"F\"\nif [ -f \"${INFO_PLIST_FILE}\" ]; then\n BuildInXcode=\"T\"\nfi\n\nif [ $BuildInXcode = \"T\" ]; then\n runInXcode\nelse\n echo \"\\nUsage: dSYMUpload.sh <bugly_app_id> <bugly_app_key> <app_bundle_identifier> <app_version> <dSYM_src_dir> <bSYMBOL_dest_dir> [upload_dsym_only]\\n\"\n # 你可以在此处直接设置BuglyAppID和BuglyAppKey,排除不常变参数的输入\n BUGLY_APP_ID=\"$1\"\n BUGLY_APP_KEY=\"$2\"\n BUNDLE_IDENTIFIER=\"$3\"\n BUGLY_APP_VERSION=\"$4\"\n DWARF_DSYM_FOLDER_PATH=\"$5\"\n SYMBOL_OUTPUT_PATH=\"$6\"\n UPLOAD_DSYM_ONLY=$7\n run ${BUGLY_APP_ID} ${BUGLY_APP_KEY} ${BUNDLE_IDENTIFIER} ${BUGLY_APP_VERSION} ${DWARF_DSYM_FOLDER_PATH} ${SYMBOL_OUTPUT_PATH} ${UPLOAD_DSYM_ONLY}\nfi\n\n";
}; };
D16947173B5604D0C2EA7767 /* [CP] Embed Pods Frameworks */ = { D16947173B5604D0C2EA7767 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#import <UserNotifications/UserNotifications.h> #import <UserNotifications/UserNotifications.h>
#endif #endif
#import "DESTool.h"
@interface AppDelegate ()<WXApiDelegate, GeTuiSdkDelegate, UNUserNotificationCenterDelegate> @interface AppDelegate ()<WXApiDelegate, GeTuiSdkDelegate, UNUserNotificationCenterDelegate>
@end @end
...@@ -52,7 +54,7 @@ ...@@ -52,7 +54,7 @@
BuglyConfig * config = [[BuglyConfig alloc] init]; BuglyConfig * config = [[BuglyConfig alloc] init];
config.blockMonitorEnable = YES; config.blockMonitorEnable = YES;
config.blockMonitorTimeout = 1; config.blockMonitorTimeout = 1;
[Bugly startWithAppId:@"560c1b40a9" config:config]; [Bugly startWithAppId:@"3339c2079b" config:config];
Data * data = [[Data alloc]init]; Data * data = [[Data alloc]init];
[data InitPlist]; [data InitPlist];
......
...@@ -21,9 +21,8 @@ ...@@ -21,9 +21,8 @@
@property (nonatomic, copy) NSString * tradeNo; @property (nonatomic, copy) NSString * tradeNo;
@property (nonatomic, copy) void (^goodsResultCallback)(id); @property (nonatomic, copy) void (^goodsResultCallback)(id);
@property (nonatomic, copy) NSString * schemes; @property (nonatomic, copy) NSString * schemes;
//@property (nonatomic, copy) void (^orderVerifyCallback)(id);
// @property (nonatomic, copy) NSString * goodsInfo;
//@property (nonatomic, copy) NSString * orderVerifyResult;
- (void)isLoadGoodsUrl; - (void)isLoadGoodsUrl;
......
...@@ -82,9 +82,9 @@ ...@@ -82,9 +82,9 @@
_requestW = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:_url]]; _requestW = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:_url]];
if (_payInfo) { // if (_payInfo) {
[_requestW addValue:_schemes forHTTPHeaderField:@"Referer"]; // [_requestW addValue:_schemes forHTTPHeaderField:@"Referer"];
} // }
[self.webView loadRequest:_requestW]; [self.webView loadRequest:_requestW];
} }
...@@ -126,14 +126,27 @@ ...@@ -126,14 +126,27 @@
if (_payInfo){ if (_payInfo){
NSString * jsonStr = [NSString stringWithFormat:@"{\"agree\":\"%@\",\"payUrl\":\"%@\",\"price\":\"%@\",\"serviceUrl\":\"%@\",\"hintStyle\":\"%@\",\"hintStyleDes\":\"%@\"}", [_payInfo objectForKey:@"agree"], [_payInfo objectForKey:@"payUrl"], [_payInfo objectForKey:@"price"], [_payInfo objectForKey:@"serviceUrl"], [_payInfo objectForKey:@"hintStyle"], [_payInfo objectForKey:@"hintStyleDes"]]; NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
NSString * jsonStr;
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
NSError *error = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:_payInfo
options:0
error:&error];
jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
}else{
jsonStr = [NSString stringWithFormat:@"{\"agree\":\"%@\",\"payUrl\":\"%@\",\"price\":\"%@\",\"serviceUrl\":\"%@\",\"hintStyle\":\"%@\",\"hintStyleDes\":\"%@\"}", [_payInfo objectForKey:@"agree"], [_payInfo objectForKey:@"payUrl"], [_payInfo objectForKey:@"price"], [_payInfo objectForKey:@"serviceUrl"], [_payInfo objectForKey:@"hintStyle"], [_payInfo objectForKey:@"hintStyleDes"]];
}
NSString *inputValueJS = [NSString stringWithFormat:@"getPayJson('%@')", jsonStr]; NSString *inputValueJS = [NSString stringWithFormat:@"getPayJson('%@')", jsonStr];
[webView evaluateJavaScript:inputValueJS completionHandler:^(id _Nullable response, NSError * _Nullable error) { [webView evaluateJavaScript:inputValueJS completionHandler:^(id _Nullable response, NSError * _Nullable error) {
//打印如果error为null,表示已调通 //打印如果error为null,表示已调通
NSLog(@"value: %@ error: %@", response, error); NSLog(@"value: %@ error: %@", response, error);
}]; }];
} }
} }
...@@ -209,7 +222,12 @@ ...@@ -209,7 +222,12 @@
if([message.name isEqualToString:@"OCJSBridge"]){ if([message.name isEqualToString:@"OCJSBridge"]){
[self share]; [self share];
}else if ([message.name isEqualToString:@"payResultCallBack"]){ }else if ([message.name isEqualToString:@"payResultCallBack"]){
[self orderVerify]; NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
[self orderVerify:message.body];
}else{
[self orderVerify:nil];
}
}else if ([message.name isEqualToString:@"protocolSelectedResultCallBack"]){ }else if ([message.name isEqualToString:@"protocolSelectedResultCallBack"]){
NSString * result = message.body; NSString * result = message.body;
[_payInfo setValue:result forKey:@"agree"]; [_payInfo setValue:result forKey:@"agree"];
...@@ -327,10 +345,14 @@ ...@@ -327,10 +345,14 @@
} }
#pragma mark 校验 #pragma mark 校验
- (void)orderVerify{ - (void)orderVerify:(NSString *)tradeNo{
if (!tradeNo) {
tradeNo = self.tradeNo;
}
[MBProgressHUD showLoading:@"正在查询结果..." toView:self.view]; [MBProgressHUD showLoading:@"正在查询结果..." toView:self.view];
[[TQNetworkTools shared] getWithAction:userPayOrder parameters:@{@"outTradeNo":self.tradeNo, @"payPlatform":@"1", @"payType":@"2"} success:^(id _Nonnull response) { [[TQNetworkTools shared] getWithAction:userPayOrder parameters:@{@"outTradeNo":tradeNo, @"payPlatform":@"1", @"payType":@"2"} success:^(id _Nonnull response) {
NSLog(@"response=========%@",response); NSLog(@"response=========%@",response);
[MBProgressHUD hideHUDForView:self.view]; [MBProgressHUD hideHUDForView:self.view];
if ([[response objectForKey:@"status"] intValue] == 200 && [[[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"status"] intValue] == 200) { if ([[response objectForKey:@"status"] intValue] == 200 && [[[[response objectForKey:@"result"] objectForKey:@"data"] objectForKey:@"status"] intValue] == 200) {
......
...@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic ,strong) NSString *productId; @property (nonatomic ,strong) NSString *productId;
@property (nonatomic ,strong) NSString *redBgStr; @property (nonatomic ,strong) NSString *redBgStr;
@property (nonatomic ,strong) NSString *voucher; @property (nonatomic ,strong) NSString *voucher;
@property (nonatomic ,strong) NSString *desc;
@property (nonatomic ,strong) NSString *originalPrice;
+(instancetype)modelWithDic:(NSDictionary *)dict; +(instancetype)modelWithDic:(NSDictionary *)dict;
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
@property (nonatomic, strong) NSMutableArray * products; @property (nonatomic, strong) NSMutableArray * products;
@property (nonatomic, strong) NSMutableArray * goodsInfo;
@property (nonatomic, assign) NSInteger goodsCount; @property (nonatomic, assign) NSInteger goodsCount;
@property (nonatomic, assign) NSInteger tradeNoCount; @property (nonatomic, assign) NSInteger tradeNoCount;
...@@ -98,7 +100,14 @@ static ZJGoodsMagager * manager; ...@@ -98,7 +100,14 @@ static ZJGoodsMagager * manager;
_callBack = callBack; _callBack = callBack;
_currentVC = currentVC; _currentVC = currentVC;
if ([self.products firstObject]) { if ([self.products firstObject]) {
[self getUrl:[self.products firstObject]];
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
[self getUrl:0];
}else{
[self getUrl:[self.products firstObject]];
}
}else{ }else{
[self getGoods]; [self getGoods];
} }
...@@ -115,6 +124,11 @@ static ZJGoodsMagager * manager; ...@@ -115,6 +124,11 @@ static ZJGoodsMagager * manager;
{ {
NSArray *goodList = response[@"result"][@"data"][@"goodsList"]; NSArray *goodList = response[@"result"][@"data"][@"goodsList"];
self.goodsInfo = [[NSMutableArray alloc] initWithCapacity:goodList.count];
for (int count = 0; count<goodList.count; count++) {
[self.goodsInfo addObject:[NSNull null]];
}
self.products = [[NSMutableArray alloc] init]; self.products = [[NSMutableArray alloc] init];
for (NSDictionary *good in goodList) { for (NSDictionary *good in goodList) {
ZJIPAProductModel *model = [ZJIPAProductModel modelWithDic:good]; ZJIPAProductModel *model = [ZJIPAProductModel modelWithDic:good];
...@@ -123,7 +137,13 @@ static ZJGoodsMagager * manager; ...@@ -123,7 +137,13 @@ static ZJGoodsMagager * manager;
} }
} }
if ([self.products firstObject]) { if ([self.products firstObject]) {
[self getUrl:[self.products firstObject]]; NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
[self getUrl_new:0];
}else{
[self getUrl:[self.products firstObject]];
}
} }
} }
} failure:^(NSError * _Nonnull error) { } failure:^(NSError * _Nonnull error) {
...@@ -168,6 +188,59 @@ static ZJGoodsMagager * manager; ...@@ -168,6 +188,59 @@ static ZJGoodsMagager * manager;
}]; }];
} }
- (void)getUrl_new:(NSInteger)index{
ZJIPAProductModel *model = self.products[index];
[MBProgressHUD showLoading:@"请稍后..." toView:_currentVC.view];
[[TQNetworkTools shared] postWithAction:userPay parameters:@{@"payPlatform":@"1", @"goodsId":[NSString stringWithFormat:@"%ld", (long)model.goodsId], @"payType":@"2", @"wxType":@"H5"} success:^(id _Nonnull response) {
[MBProgressHUD hideHUDForView:self.currentVC.view];
if ([response[@"status"] integerValue] == 200 && ![[[response objectForKey:@"result"] objectForKey:@"data"] isKindOfClass:[NSNull class]]) {
// [self webGoods:response good:model tradeNo:response[@"result"][@"data"][@"wakeup"][@"extData"]];
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
NSString * string = [NSString stringWithFormat:@"%@&redirect_url=%@", [[[response[@"result"] objectForKey:@"data"]objectForKey:@"wakeup"] objectForKey:@"mwebUrl"], [dic objectForKey:@"WXbackUrl"]];
// NSDictionary * goodDic = @{@"payUrl":string,@"price":[NSString stringWithFormat:@"%.2f", (float)model.fen/100],@"desc":model.desc,@"name":model.name,@"originalPrice":[NSString stringWithFormat:@"%.2f", [model.originalPrice floatValue]],@"tradeNo":response[@"result"][@"data"][@"wakeup"][@"extData"],@"id":[NSString stringWithFormat:@"%ld", (long)index]};
NSDictionary * goodDic = @{@"payUrl":string,@"price":@(model.fen/100),@"desc":model.desc,@"name":model.name,@"originalPrice":@([model.originalPrice floatValue]),@"tradeNo":[NSString stringWithFormat:@"%@", response[@"result"][@"data"][@"wakeup"][@"extData"]],@"id":[NSString stringWithFormat:@"%ld", (long)index]};
[self.goodsInfo replaceObjectAtIndex:index withObject:goodDic];
if (index<self.products.count-1) {
[self getUrl_new:index+1];
}else{
NSError *error = nil;
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:self.goodsInfo
options:0
error:&error];
NSString * jsonStr = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding];
[self webGoods_new:jsonStr];
}
}else{
if (self.tradeNoCount < 3) {
[self getUrl_new:index];
self.tradeNoCount++;
NSError * error = [NSError errorWithDomain:NSCocoaErrorDomain code:998 userInfo:nil];
[Bugly reportError:error];
}
}
} failure:^(NSError * _Nonnull error) {
[MBProgressHUD hideHUDForView:self.currentVC.view];
// [MBProgressHUD showError:@"商品信息获取失败,请稍后再试" toView:self.currentVC.view];
if (self.tradeNoCount < 3) {
[self getUrl_new:index];
self.tradeNoCount++;
NSError * error = [NSError errorWithDomain:NSCocoaErrorDomain code:999 userInfo:nil];
[Bugly reportError:error];
}
}];
}
- (void)webGoods:(id)response good:(ZJIPAProductModel *)model tradeNo:(NSString *)tradeNo{ - (void)webGoods:(id)response good:(ZJIPAProductModel *)model tradeNo:(NSString *)tradeNo{
NSDictionary * dic = [ZJUserInfoManager shared].h5_url; NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
...@@ -195,6 +268,42 @@ static ZJGoodsMagager * manager; ...@@ -195,6 +268,42 @@ static ZJGoodsMagager * manager;
[weakSelf.web.navigationController popViewControllerAnimated:YES]; [weakSelf.web.navigationController popViewControllerAnimated:YES];
}; };
[[NSNotificationCenter defaultCenter] addObserver:_web selector:@selector(isLoadGoodsUrl) name:@"loadingGoodsUrl" object:nil];
}
- (void)webGoods_new:(id)response{
NSDictionary * dic = [ZJUserInfoManager shared].h5_url;
NSDictionary * switchDic = [[self.data Read] objectForKey:@"switch"];
NSString * serviceUrl = [dic objectForKey:@"pay"] ? : @"";
NSString * userUrl = [dic objectForKey:@"user"] ? : @"";
NSString * privacyUrl = [dic objectForKey:@"privacy"] ? : @"";
NSString * agree = [switchDic objectForKey:@"wd_agreement_selected"] ? : @"";
NSString * hintStyle = [[self.data Read] objectForKey:@"hintStyle"]?:@"99";
NSString * hintStyleDes = [[self.data Read] objectForKey:@"hintStyleDes"]?:@"";
_web = [[BaseWebViewController alloc] init];
_web.url = [dic objectForKey:@"appPayUrl"];
if ([[switchDic objectForKey:@"isLadderPay"] isEqual:@1]) {
_web.url = [dic objectForKey:@"LadderPayUrl"];
}else{
_web.url = [dic objectForKey:@"appPayUrl"];
}
_web.payInfo = @{@"goodsInfo":self.goodsInfo,@"serviceUrl":serviceUrl,@"userUrl":userUrl,@"privacyUrl":privacyUrl,@"agree":agree,@"hintStyle":hintStyle,@"hintStyleDes":hintStyleDes}.mutableCopy;
_web.schemes = [dic objectForKey:@"WXbackUrl"];
[_currentVC.navigationController pushViewController:_web animated:YES];
__weak typeof(self) weakSelf = self;
_web.goodsResultCallback = ^(id s) {
if (weakSelf.callBack) {
weakSelf.callBack(@"");
};
[weakSelf.web.navigationController popViewControllerAnimated:YES];
};
[[NSNotificationCenter defaultCenter] addObserver:_web selector:@selector(isLoadGoodsUrl) name:@"loadingGoodsUrl" object:nil]; [[NSNotificationCenter defaultCenter] addObserver:_web selector:@selector(isLoadGoodsUrl) name:@"loadingGoodsUrl" object:nil];
} }
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#define desT @"eJPB1HATUNI756zWUOPE+dPczxzN3HWa9DATylzXdO7FKBXnJsm8NFBd30+x6upr1wEJYuMyb3Q=" #define desT @"eJPB1HATUNI756zWUOPE+dPczxzN3HWa9DATylzXdO7FKBXnJsm8NFBd30+x6upr1wEJYuMyb3Q="
/// 个推开发者网站中申请App时,注册的AppId、AppKey、AppSecret /// 个推开发者网站中申请App时,注册的AppId、AppKey、AppSecret
#define kGtAppId @"DOXzblsxdbAPrxvxJFH5a1" #define kGtAppId @"HHjxMZXxdv7ohGYzfVeEN2"
#define kGtAppKey @"6bKiKrGtnv5gm313HrSxo1" #define kGtAppKey @"zvCOWs6vF1A4pUqCmO4Ou7"
#define kGtAppSecret @"cXsoWq3JKZ6ouW3dbsuXeA" #define kGtAppSecret @"pTQjZWnVT08vyYCtMZXgP2"
//#if DEBUG //#if DEBUG
// //
......
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