import PayX from 'payx';
var payX = new PayX({
clientId: 'test'
});
if (!payX.isLogined()) {
payX.login();
}
payX.profile(function(error, profile) {
console.log(profile);
});
payX.pay({
amount: 1.00,
subject: '测试商品来一发'
});
payX.wxReady(function() {
wx.onMenuShareTimeline({
title: 'hahahahahah',
link: 'http://127.0.0.1/haha.html',
imgUrl: 'https://tpc.googlesyndication.com/simgad/5673222705765011533',
success: function() {
alert('ok');
},
cancel: function() {
alert('cancel');
}
});
wx.onMenuShareAppMessage({
title: '测试分享链接',
desc: 'fuck',
link: 'http://wxjs.vifii.com/test/pay.html',
imgUrl: 'https://tpc.googlesyndication.com/simgad/5673222705765011533',
type: 'link',
dataUrl: '',
success: function() {
},
cancel: function() {
}
});
wx.getNetworkType({
success: function(res) {
var networkType = res.networkType;
alert('您的网络' + networkType);
}
});
});