|
@@ -34,14 +34,18 @@ App({
|
|
|
let uid = wx.getStorageSync('uid')
|
|
|
if (uid) {
|
|
|
let userInfo = await getMyInfo()
|
|
|
- console.log(userInfo,'zzz');
|
|
|
+ console.log(userInfo, 'zzz');
|
|
|
this.setUser(userInfo.user)
|
|
|
this.globalData.userInfo = userInfo.user
|
|
|
if (getApp().callBack) {
|
|
|
getApp().callBack(userInfo.users);
|
|
|
}
|
|
|
} else {
|
|
|
- let userRes = await androidLogin({extOpenId:'1234567',channel:'3016',grade:'PRIMARY_FIRST_GRADE'})
|
|
|
+ let userRes = await androidLogin({
|
|
|
+ extOpenId: '77777777',
|
|
|
+ channel: '3016',
|
|
|
+ grade: 'PRIMARY_FIRST_GRADE'
|
|
|
+ })
|
|
|
this.setUser(userRes.user)
|
|
|
wx.setStorageSync('uid', userRes.user.uid)
|
|
|
wx.setStorageSync('user', userRes.user)
|
|
@@ -68,19 +72,19 @@ App({
|
|
|
initPlugin() {
|
|
|
let miniAppPluginId = 'wxf1a06dafa3350688'
|
|
|
//根据模块ID初始化模块
|
|
|
- console.log("插件ID:" + miniAppPluginId)
|
|
|
wx.miniapp.loadNativePlugin({
|
|
|
pluginId: miniAppPluginId,
|
|
|
+ channelCode: '3016',
|
|
|
success: (plugin) => {
|
|
|
this.globalData.plugin = plugin
|
|
|
- console.log('load plugin success', plugin)
|
|
|
- this.globalData.plugin.initPlugin(({}), (res) => {
|
|
|
- if (res === "success") {
|
|
|
- console.log("初始化plugin成功")
|
|
|
- } else {
|
|
|
- console.log("初始化plugin失败")
|
|
|
- }
|
|
|
- })
|
|
|
+ console.log('前端', plugin)
|
|
|
+ this.globalData.plugin.initPlugin(({}), (res) => {
|
|
|
+ if (res === "success") {
|
|
|
+ console.log("初始化plugin成功")
|
|
|
+ } else {
|
|
|
+ console.log("初始化plugin失败")
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
fail: (e) => {
|
|
|
console.log('load plugin fail', e)
|