Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
96fb4ff5
authored
Jan 16, 2020
by
mReturn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户验收二维码
parent
fc52a1b8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
26 deletions
baseSDK/src/main/java/com/dayu/common/Constants.java
orderCenter/src/main/java/com/dayu/order/api/OrderApiFactory.java
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
orderCenter/src/main/java/com/dayu/order/common/OrderConstant.java
orderCenter/src/main/java/com/dayu/order/presenter/qrcode/QRCodePresenter.java
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
96fb4ff5
...
...
@@ -26,30 +26,30 @@ public class Constants {
/**
* uat环境配置.
*/
public
static
final
String
ENVIROMENT
=
"uat"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
BASE_URL
=
"http://47.95.223.6:3112"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"http://47.95.223.6:9004/#/sop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"http://47.95.223.6:9004/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.95.223.6:9004/#/detail"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"http://47.95.223.6:9004/#/manySop"
;
public
static
final
boolean
IS_DEBUG
=
true
;
//
public static final String ENVIROMENT = "uat";
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String BASE_URL = "http://47.95.223.6:3112";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "http://47.95.223.6:9004/#/sop";
//
public final static String WEB_SOP_DETAIL = "http://47.95.223.6:9004/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "http://47.95.223.6:9004/#/detail";
//
public final static String CHECK_MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "http://47.95.223.6:9004/#/manySop";
//
public static final boolean IS_DEBUG = true;
/**
* 正式环境.
*/
//
public static final String ENVIROMENT = "release";
//
public static final int LOG_LEVEL = LogUtils.LEVEL_OFF;
//
public static final String BASE_URL = "https://mobile.kf.ai";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final boolean IS_DEBUG = false;
public
static
final
String
ENVIROMENT
=
"release"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
final
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
boolean
IS_DEBUG
=
false
;
/**
* 统一配置.
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderApiFactory.java
View file @
96fb4ff5
...
...
@@ -157,8 +157,8 @@ public class OrderApiFactory {
public
static
Observable
<
String
>
createUrl
(
int
orderId
)
{
return
Api
.
getService
(
OrderService
.
class
).
createUrl
(
orderId
).
compose
(
Api
.
applySchedulers
());
}
public
static
Call
<
ResponseBody
>
createWxUrl
(
int
orderId
,
int
width
)
{
return
Api
.
getService
(
OrderService
.
class
).
createWxUrl
(
orderId
,
width
);
public
static
Call
<
ResponseBody
>
createWxUrl
(
String
path
,
int
width
)
{
return
Api
.
getService
(
OrderService
.
class
).
createWxUrl
(
path
,
width
);
}
public
static
Observable
<
Boolean
>
queryPayStatus
(
int
siteId
)
{
...
...
orderCenter/src/main/java/com/dayu/order/api/OrderService.java
View file @
96fb4ff5
...
...
@@ -343,7 +343,7 @@ interface OrderService {
Observable
<
BaseResponse
<
String
>>
createUrl
(
@Path
(
"orderId"
)
int
orderId
);
@GET
(
OrderConstant
.
CREATE_WX_URL
)
Call
<
ResponseBody
>
createWxUrl
(
@Query
(
"
id"
)
int
workId
,
@Query
(
"width"
)
int
width
);
Call
<
ResponseBody
>
createWxUrl
(
@Query
(
"
path"
)
String
path
,
@Query
(
"width"
)
int
width
);
/**
* 查询是否开通移动支付.
...
...
orderCenter/src/main/java/com/dayu/order/common/OrderConstant.java
View file @
96fb4ff5
...
...
@@ -171,7 +171,8 @@ public class OrderConstant {
public
final
static
String
CREATE_URL
=
"/api-user"
+
"/account/createUrlByOrderId/{orderId}"
;
public
final
static
String
CREATE_WX_URL
=
"/api-third/WXUser/getWxQrCode?path=pages/orderServerDetail/main"
;
// public final static String CREATE_WX_URL = "/api-third/WXUser/getWxQrCode?path=pages/orderServerDetail/main";
public
final
static
String
CREATE_WX_URL
=
"/api-third/WXUser/getWxQrCode"
;
/**
* 修改自建单.
...
...
orderCenter/src/main/java/com/dayu/order/presenter/qrcode/QRCodePresenter.java
View file @
96fb4ff5
...
...
@@ -6,11 +6,14 @@ import android.graphics.BitmapFactory;
import
com.dayu.common.Constants
;
import
com.dayu.order.R
;
import
com.dayu.order.api.OrderApiFactory
;
import
com.dayu.order.common.OrderConstant
;
import
com.dayu.utils.QRCodeUtils
;
import
com.dayu.utils.ToastUtils
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
okhttp3.ResponseBody
;
import
retrofit2.Call
;
...
...
@@ -40,7 +43,14 @@ public class QRCodePresenter extends QRCodeContract.Presenter {
// }));
Call
<
ResponseBody
>
call
=
OrderApiFactory
.
createWxUrl
(
mId
,
470
);
// OrderConstant.CREATE_WX_URL = OrderConstant.CREATE_WX_URL.replace("{id}",mId+"");
String
path
=
"pages/orderServerDetail/main?id="
+
mId
;
// try {
// path = URLEncoder.encode(path,"UTF-8");
// } catch (UnsupportedEncodingException e) {
// e.printStackTrace();
// }
Call
<
ResponseBody
>
call
=
OrderApiFactory
.
createWxUrl
(
path
,
470
);
call
.
enqueue
(
new
Callback
<
ResponseBody
>()
{
@Override
public
void
onResponse
(
Call
<
ResponseBody
>
call
,
Response
<
ResponseBody
>
response
)
{
...
...
@@ -50,7 +60,7 @@ public class QRCodePresenter extends QRCodeContract.Presenter {
Bitmap
bitmap
=
BitmapFactory
.
decodeStream
(
is
);
is
.
close
();
mView
.
setBitmap
(
bitmap
);
}
catch
(
IO
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
ToastUtils
.
showShortToast
(
R
.
string
.
error_unknow
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment