close #36
This commit is contained in:
parent
f65c64cbeb
commit
c6a9854717
@ -316,4 +316,33 @@ public enum JSSDKAPI {
|
||||
* 企业号会话接口集合
|
||||
*/
|
||||
public final static JSSDKAPI[] CHAT_APIS = { openEnterpriseChat };
|
||||
|
||||
/**
|
||||
* 公众平台全部接口集合
|
||||
*/
|
||||
public final static JSSDKAPI[] MP_ALL_APIS = { onMenuShareTimeline,
|
||||
onMenuShareAppMessage, onMenuShareQQ, onMenuShareWeibo,
|
||||
onMenuShareQZone, chooseImage, previewImage, uploadImage,
|
||||
downloadImage, startRecord, stopRecord, onVoiceRecordEnd,
|
||||
playVoice, pauseVoice, stopVoice, onVoicePlayEnd, uploadVoice,
|
||||
downloadVoice, translateVoice, getNetworkType, openLocation,
|
||||
getLocation, startSearchBeacons, stopSearchBeacons,
|
||||
onSearchBeacons, hideOptionMenu, showOptionMenu, closeWindow,
|
||||
hideMenuItems, showMenuItems, hideAllNonBaseMenuItem,
|
||||
showAllNonBaseMenuItem, scanQRCode, openProductSpecificView,
|
||||
chooseCard, addCard, openCard, consumeAndShareCard, chooseWXPay };
|
||||
/**
|
||||
* 企业号全部接口集合
|
||||
*/
|
||||
public final static JSSDKAPI[] QY_ALL_APIS = { onMenuShareTimeline,
|
||||
onMenuShareAppMessage, onMenuShareQQ, onMenuShareWeibo,
|
||||
onMenuShareQZone, chooseImage, previewImage, uploadImage,
|
||||
downloadImage, startRecord, stopRecord, onVoiceRecordEnd,
|
||||
playVoice, pauseVoice, stopVoice, onVoicePlayEnd, uploadVoice,
|
||||
downloadVoice, translateVoice, getNetworkType, openLocation,
|
||||
getLocation, startSearchBeacons, stopSearchBeacons,
|
||||
onSearchBeacons, hideOptionMenu, showOptionMenu, closeWindow,
|
||||
hideMenuItems, showMenuItems, hideAllNonBaseMenuItem,
|
||||
showAllNonBaseMenuItem, scanQRCode, openEnterpriseChat,
|
||||
openEnterpriseContact };
|
||||
}
|
||||
|
||||
@ -60,6 +60,9 @@ public class Weixin4jConfigUtil {
|
||||
String value = defaultValue;
|
||||
try {
|
||||
value = getValue(key);
|
||||
if (StringUtil.isBlank(value)) {
|
||||
value = defaultValue;
|
||||
}
|
||||
} catch (MissingResourceException e) {
|
||||
;
|
||||
} catch (NullPointerException e) {
|
||||
|
||||
@ -5,11 +5,9 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.foxinmy.weixin4j.exception.WeixinException;
|
||||
import com.foxinmy.weixin4j.model.WeixinAccount;
|
||||
import com.foxinmy.weixin4j.mp.token.WeixinTokenCreator;
|
||||
import com.foxinmy.weixin4j.token.FileTokenStorager;
|
||||
import com.foxinmy.weixin4j.token.TokenHolder;
|
||||
import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
||||
import com.foxinmy.weixin4j.util.Weixin4jSettings;
|
||||
|
||||
/**
|
||||
* token测试
|
||||
@ -22,14 +20,14 @@ import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
||||
public class TokenTest {
|
||||
|
||||
protected TokenHolder tokenHolder;
|
||||
protected Weixin4jSettings settings;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
WeixinAccount weixinAccount = Weixin4jConfigUtil.getWeixinAccount();
|
||||
tokenHolder = new TokenHolder(new WeixinTokenCreator(
|
||||
weixinAccount.getId(), weixinAccount.getSecret()),
|
||||
new FileTokenStorager(Weixin4jConfigUtil.getValue("token.path",
|
||||
"/tmp/weixin4j/token")));
|
||||
this.settings = new Weixin4jSettings();
|
||||
tokenHolder = new TokenHolder(new WeixinTokenCreator(settings
|
||||
.getWeixinAccount().getId(), settings.getWeixinAccount()
|
||||
.getSecret()), settings.getTokenStorager0());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@ -5,11 +5,9 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.foxinmy.weixin4j.exception.WeixinException;
|
||||
import com.foxinmy.weixin4j.model.WeixinAccount;
|
||||
import com.foxinmy.weixin4j.qy.token.WeixinTokenCreator;
|
||||
import com.foxinmy.weixin4j.token.FileTokenStorager;
|
||||
import com.foxinmy.weixin4j.token.TokenHolder;
|
||||
import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
||||
import com.foxinmy.weixin4j.util.Weixin4jSettings;
|
||||
|
||||
/**
|
||||
* token测试
|
||||
@ -22,14 +20,14 @@ import com.foxinmy.weixin4j.util.Weixin4jConfigUtil;
|
||||
public class TokenTest {
|
||||
|
||||
protected TokenHolder tokenHolder;
|
||||
protected Weixin4jSettings settings;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
WeixinAccount weixinAccount = Weixin4jConfigUtil.getWeixinAccount();
|
||||
tokenHolder = new TokenHolder(new WeixinTokenCreator(
|
||||
weixinAccount.getId(), weixinAccount.getSecret()),
|
||||
new FileTokenStorager(Weixin4jConfigUtil.getValue("token.path",
|
||||
"/tmp/weixin4j/token")));
|
||||
this.settings = new Weixin4jSettings();
|
||||
tokenHolder = new TokenHolder(new WeixinTokenCreator(settings
|
||||
.getWeixinAccount().getId(), settings.getWeixinAccount()
|
||||
.getSecret()), settings.getTokenStorager0());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user