优化显示bug

This commit is contained in:
java110 2022-03-21 14:17:37 +08:00
parent 89d90be40a
commit 4682ef8dc5
2 changed files with 12 additions and 7 deletions

View File

@ -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)

View File

@ -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',