hui.zhou
parent
17646d19b0
commit
5362a7dd21
|
|
@ -15,7 +15,7 @@ export default {
|
|||
this.$store.dispatch('app/getArticle');
|
||||
|
||||
/* #ifdef MP-WEIXIN */
|
||||
wxMnpLogin()
|
||||
// wxMnpLogin()
|
||||
/* #endif */
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
|
|
@ -28,10 +28,13 @@ export default {
|
|||
// checkUpdate();
|
||||
// #endif
|
||||
},
|
||||
onShow: function (option) {
|
||||
onShow(option) {
|
||||
console.log(option);
|
||||
let invite_code = option.query.invite_code || strToParams(decodeURIComponent(option.query.scene)).invite_code
|
||||
uni.setStorageSync('INVITE_CODE',invite_code)
|
||||
/* #ifdef MP-WEIXIN */
|
||||
wxMnpLogin()
|
||||
/* #endif */
|
||||
},
|
||||
onHide: function () {
|
||||
console.log('App Hide');
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ export function getWxCode() {
|
|||
export async function wxMnpLogin(){
|
||||
store.commit('user/LOGOUT')
|
||||
const code = await getWxCode()
|
||||
await silentLogin({code})
|
||||
const invite_code= uni.getStorageSync('INVITE_CODE')||null
|
||||
await silentLogin({code,invite_code})
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue