mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-24 05:46:04 +08:00
优化显示bug
This commit is contained in:
parent
89d90be40a
commit
4682ef8dc5
@ -8,13 +8,13 @@ import {
|
||||
import url from '../../../constant/url.js'
|
||||
export function pageOnLoad(options) {
|
||||
|
||||
getWAppId()
|
||||
getPageWAppId()
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取WAppId
|
||||
*/
|
||||
export function getWAppId() {
|
||||
export function getPageWAppId() {
|
||||
let wAppId = conf.wAppId;
|
||||
//5.0 存储至磁盘中
|
||||
saveWAppId(wAppId)
|
||||
|
||||
@ -22,7 +22,7 @@ export function pageOnLoad(options) {
|
||||
doLoginOwnerByKey(_key, callback);
|
||||
}
|
||||
|
||||
getPageWAppId()
|
||||
getPageWAppId(options)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,7 +41,7 @@ export function doLoginOwnerByKey(_key, callback = () => {}) {
|
||||
let _param = res.data;
|
||||
if (_param.code != 0) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/showlogin/showlogin?wAppId=' + getPageWAppId()
|
||||
url: '/pages/showlogin/showlogin?wAppId=' + getWAppId()
|
||||
});
|
||||
return;
|
||||
}
|
||||
@ -53,14 +53,19 @@ export function doLoginOwnerByKey(_key, callback = () => {}) {
|
||||
fail: function(error) {
|
||||
// 调用服务端登录接口失败
|
||||
uni.navigateTo({
|
||||
url: '/pages/showlogin/showlogin?wAppId=' + getPageWAppId()
|
||||
url: '/pages/showlogin/showlogin?wAppId=' + getWAppId()
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export function getPageWAppId() {
|
||||
let wAppId = getWAppId();
|
||||
export function getPageWAppId(options) {
|
||||
let wAppId = options.wAppId;
|
||||
if (!isNull(wAppId)) {
|
||||
saveWAppId(wAppId)
|
||||
return wAppId;
|
||||
}
|
||||
wAppId = getWAppId();
|
||||
if (isNull(wAppId)) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user