xmlrpc/app.js

37 lines
944 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// app.js
App({
onLaunch() {
// 展示本地存储能力
const logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
// 定义全局配置信息
this.globalData = {
odooUrl: 'https://www.gdsfs.top', // 请填写有效的 URL不包含端口号
db: 'YS2025', // 请填写数据库名称
username: '441785369@qq.com',
password: 'Sj89061189'
};
const conf = wx.getStorageSync('conf') || {};
conf.odooUrl = this.globalData.odooUrl;
conf.db = this.globalData.db;
conf.username = this.globalData.username;
// conf.password = this.globalData.password;
wx.setStorageSync('conf', conf)
// 登录
wx.login({
success: res => {
// 发送 res.code 到后台换取 openId, sessionKey, unionId
}
})
},
globalData: {
userInfo: null,
odooUrl: '',
db: '',
username: ''
}
})