Fetch the repository succeeded.
This action will force synchronization from 黄秀杰/lendoo-wx, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
/**
*
* 配套视频教程请移步微信->小程序->灵动云课堂
* 关注订阅号【huangxiujie85】,第一时间收到教程推送
*
* @link http://blog.it577.net
* @author 黄秀杰
*/
// 初始化AV
const AV = require('./utils/av-weapp.js');
const appId = "7tm1OFlNlmLFukegUhmm4uDU-gzGzoHsz";
const appKey = "XG4FRumQWJ7mNkFIral0ttvj";
AV.init({
appId: appId,
appKey: appKey
});
// 授权登录
App({
onLaunch: function () {
// auto login via SDK
var that = this;
AV.User.loginWithWeapp();
// 已废弃,已改用云函数实现,详见:http://blog.it577.net/index.php/archives/7/
// wx.login({
// success: function(res) {
// if (res.code) {
// that.code = res.code;
// // 获取openId并缓存
// wx.request({
// url: 'https://lendoo.leanapp.cn/index.php/WXPay/getSession',
// data: {
// code: res.code,
// },
// method: 'POST',
// header: {
// 'content-type': 'application/x-www-form-urlencoded'
// },
// success: function (response) {
// that.openid = response.data.openid;
// }
// });
// } else {
// console.log('获取用户登录态失败!' + res.errMsg)
// }
// }
// });
// 设备信息
wx.getSystemInfo({
success: function(res) {
that.screenWidth = res.windowWidth;
that.screenHeight = res.windowHeight;
that.pixelRatio = res.pixelRatio;
}
});
}
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。